angular2-template-loader
angular2-template-loader copied to clipboard
Feature request
Do you have some plans to add the styles and script config by default.
What I mean: Often I have something like this
my.component.ts my.component.html my.component.scss
It is obvious when you see the naming that these files belong together. There should be a convention model for angular which integrates the content automatically.
good idea but I think that out of scope of this module but could be created as another one
OK :( ... I was thinking about to start one, but I don't know how to manage the source maps.
Yeah this loader is designed to have one specific task as is all webpack loaders. Its a great idea though. Thanks @gdi2290 for following up.
I will be working on a module similar to this feature request for Ionic2. We plan on integrating like named component dependencies. Still working through the specifics but I will post here once it is completed.
all you would need to do is detect a @Component without a template or style then inject them with require just as it's done here. The only downside is that now it's very magical and you now need to stick with the conventions but you can do this as the default and ignore the component if it has a template/style
Yes and the magic has been a discussion point for us. Not a for sure thing yet but I will probably release a plugin for it anyway.
I am using a custom version of the baggage-loader (https://github.com/deepsweet/baggage-loader) at the moment to get rid of the paths. Works pretty well and is a big improvement.