ngtemplate-loader
ngtemplate-loader copied to clipboard
Parameter Interpolation
I'm trying to make my code more pretty by replacing this -
templateUrl: 'foo/bar.template.jade'
with this
templateUrl: 'foo/bar'
Something similar was implemented in PR #35 which was dismissed by @WearyMonkey who said
The same effect can now be achieved with parameter interpolation in 2.0.0.
But even after reading Parameter Interpolation, and subsequently Webpack's standard interpolation rules, I still can't wrap my head around this.
Could anyone please provide some example how this can be achieved?
found a little hack that does the job thanks to @GuyPie -
loader: 'ngtemplate-loader?relativeTo=[path][name].[ext]&prefix=[1]&prefixRegExp=\\/foo\\/(.*)\\.template\\.jade'