Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter Interpolation #67

Open
IdanCo opened this issue Jul 12, 2017 · 1 comment
Open

Parameter Interpolation #67

IdanCo opened this issue Jul 12, 2017 · 1 comment

Comments

@IdanCo
Copy link

IdanCo commented Jul 12, 2017

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?

@IdanCo
Copy link
Author

IdanCo commented Jul 12, 2017

found a little hack that does the job thanks to @GuyPie -

loader: 'ngtemplate-loader?relativeTo=[path][name].[ext]&prefix=[1]&prefixRegExp=\\/foo\\/(.*)\\.template\\.jade'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant