Closed ugultopu closed 7 years ago
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
templateUrl: './app.html'
What would be the differences between these two approaches?
i think there were differences in the past. right now the suggested way is to use the @angular/cli. have a look here.
@angular/cli
In app.js, the template is referenced as follows:
However, AngularJS has a
templateUrl
option as well and it could have been written as following as well:What would be the differences between these two approaches?