Skip to content

components templates not included #139

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

Closed
consigliory opened this issue Apr 2, 2017 · 5 comments
Closed

components templates not included #139

consigliory opened this issue Apr 2, 2017 · 5 comments

Comments

@consigliory
Copy link

Hi, Mark
trying to sync to use latest and greatest (new webpack config and angular 4) but if fails to use html templates. it trying to get it over http without success. before templates was included in build.
Unhandled Promise rejection: Failed to load navmenu.component.html ; Zone: ; Task: Promise.then ; Value: Failed to load navmenu.component.html
//templateUrl: './home.component.html' - this will try to load it over http
template:<h1>hello world</h1> this works just fine.
Any ideas what am I doing wrong? with 2.4 templateUrl was working just fine and templates was included in build

@MarkPieszak
Copy link
Member

This line here is what gets it working:
https://github.com/MarkPieszak/aspnetcore-angular2-universal/blob/master/webpack.config.js#L19

The angular2-template-loader, is that missing for you perhaps?

@consigliory
Copy link
Author

thanks for quick response. I do have this line in config.
it works only if I use template: require('./home.component.html')

@MarkPieszak
Copy link
Member

It must not be installed maybe? Is it in your package.json as well?

@consigliory
Copy link
Author

at any case - plugin is installed but for some reason did not work. I changed to user webpack require which works just fine. Thanks for your work. It is super helpful and your quick responses is really impressive.

@MarkPieszak
Copy link
Member

Just made some major changes via #151 (we now have AoT, bootstrap SCSS & ng2-bootstrap)
Can you give it a try now? I'll close this out for now but let me know if it still isn't working I can try to take a look. Couldn't repro it though :(

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

No branches or pull requests

2 participants