Skip to content

Conversation

@sheerun
Copy link
Contributor

@sheerun sheerun commented Oct 9, 2015

Hey,

I'm re-writing angular 1.0 app and I'd like to include partials directly from templates, like so:

<div id="gallery">${require("./partials/gallery.html")}</div>

instead of relying on ng-include:

<div id="gallery" ng-include="'partials/gallery.html'"></div>

This commit adds in 2 lines of JS support for es6 interpolation in any place of the template.

I find it very useful, I hope you too.

@sokra
Copy link
Member

sokra commented Nov 18, 2015

As this is a breaking change, it should be better enabled with query parameter i. e. html-loader?interpolate

@sheerun
Copy link
Contributor Author

sheerun commented Nov 18, 2015

If I change this, will you accept this PR? :)

@sokra
Copy link
Member

sokra commented Nov 18, 2015

yep, if everything is fine. It looks like a useful feature.

But please add some tests for this.

@sheerun
Copy link
Contributor Author

sheerun commented Nov 22, 2015

@sokra I've rebased, added a flag, updated README, and added the tests. All good?

sokra added a commit that referenced this pull request Nov 23, 2015
Add support for es6 interpolation
@sokra sokra merged commit d885413 into webpack:master Nov 23, 2015
@sokra
Copy link
Member

sokra commented Nov 23, 2015

Thanks

@sheerun
Copy link
Contributor Author

sheerun commented Nov 23, 2015

Cool :) Could you release minor bump?

@sokra
Copy link
Member

sokra commented Nov 23, 2015

Soon...

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

Successfully merging this pull request may close these issues.

2 participants