Open psujit opened 7 years ago
I found a work around:
Instead of using templateUrl
, use template
with require
method.
For e.g.:
template: require('../views/newpage.html'),
Although this works, I would still like to know what is the issue with using templateUrl
.
Hello, I am using this generator for my application and I am adding multiple states inside the app.routes.js. I am using
templateUrl
to provide the path of the partial/view file. But the application fails to load the HTML partial/view file(newpage.html) which is situated inapp/views/
folder. I tried all options for relative paths in app.routes.js. What can be done in order thattemplateUrl
works perfectly? The exact error I am getting is this:Error: [$compile:tpload] Failed to load template: /src/app/views/newpage.html (HTTP status: 404 Not Found)
Please let me know what path has to be used to correctly access the partial/view.