Reputation: 3393
In angular2, if using internal template in @component, the route works. But if using templateUrl to add external template, it shows an error: can't find resources **.html. Do I need to add something else if using external template?
@Component{
template: ``
}
@Component{
templateUrl: "**.html"
}
Upvotes: 0
Views: 554
Reputation: 5606
Do something like this:
templateUrl:"rootDir/Components/template.html"
My guess is you are using a relative path like this.
templateUrl:"./template.html"
But without seeing more code it is difficult to figure out the exact problem.
Upvotes: 1