preboot/angularjs-webpack

When to use `templateUrl` vs `template: require('./app.html')`?

ugultopu opened this issue · 1 comments

In app.js, the template is referenced as follows:

template: require('./app.html')

However, AngularJS has a templateUrl option as well and it could have been written as following as well:

templateUrl: './app.html'

What would be the differences between these two approaches?

phra commented

i think there were differences in the past. right now the suggested way is to use the @angular/cli. have a look here.