-
Notifications
You must be signed in to change notification settings - Fork 518
Unable to load assets without using require() #333
Comments
Hey @RobCannon, yes at the moment Universal requires that external assets for template and styles be loaded that way with require() unfortunately. :( angular/universal#432 (you can track the issue here) |
Thanks for raising this. I agree that some developers are going to hit issues following tutorials that use However, the I'll close this as it's an external issue, but if more people report getting into trouble with this, we can add notes to the docs. |
But this used to work with the previous release? I need to load my templates from the ASP.Net View engine so the authentication pipeline is used? Or am I seeing a different error?
|
@fergalmoran That message is from Angular. Perhaps something changed in Angular 2.0 final as compared with RC4 which you were probably using before. |
The template uses require() to load assets from a source .html or .css file. For example:
But Angular also allows you to load those assets with a url. In fact, that is the default mechanism when you create an app with angular-cli. It would look like this:
But that does not work with this template. It should work because a lot of Angular examples use that and it will lead to a lot of confusion. Also, it makes it difficult to port an app built with angular-cli to use this framework.
The text was updated successfully, but these errors were encountered: