Is there a way to use a .html file as a template in AngularJS instead of directly including HTML code in the template attribute?
Here is the code I have written:
.directive('navigation', ['$rootScope', '$i18next', function ($rootScope: any, $i18next: any) {
return {
bindToController: true,
template: '../views/navigation-directive.html',
link: function (scope, element, attrs) {....
However, the browser only displays '../views/navigation-directive.html' in plaintext when I run this code.
https://i.sstatic.net/vAApZ.png
The current file structure is as follows:
The directive file is located in solution/script/navigation.js the .html file is located in solution/view/navigation-directive.html