I\'m trying to build my own Angular 2/ASP.NET SPA on Visual Studio. You can find all the files here.
What I tried to do is simple: after I followed the instructions to
The UniversalModule currently requires that external assets for templates and styles use require().
Try changing templateUrl: './test.component.html'
to template: require('./test.component.html')
.
And styleUrls: ['./test.component.css']
to styles: [require('./test.component.css')]
More details on the issue can be found here: Unable to load assets without using require()
For reference, here is the issue thread from Angular on Github: track runtime styleUrls. They recommend using the angular2-template-loader.