angular2-template-loader
angular2-template-loader copied to clipboard
Angular2-template-loader does not work with awesome-typescript-loader in my tests
EDIT (Nov 1, 2016): template: require('./myComponent.html') was necessary for me to use with awesome-typescript-loader, which defeated the point since templateURL should be working and converted to in-line on the fly. templateUrl didn't work even with a hardcoded path. However no issues with ts-loader so my problem was solved.
Here is some of my webpack.test.js configuration:
module: {
loaders: [
{
test: /\.ts$/,
loaders: ['awesome-typescript-loader', 'angular2-template-loader']
},
{
test: /\.html$/,
loader: 'raw-loader'
}
] }
I would accept a PR for having the loader accept an option in the config that doesn't transform the templateUrl, etc.
Well this did finally work for me with ts-loader. Not awesome-typescript-loader.
Hi @TheLarkInn, I just implemented this feature using a keepUrl
option and here's the PR: https://github.com/TheLarkInn/angular2-template-loader/pull/39
But I'm still not satisfied with it's name :) any better ideas?
Thanks!
i tried to adjust the loader order like #19 , also works for tests