I am trying to get a MVC with Spring and Angular JS and it is currently working [well actually it just calls the index.html so yeah]. The thing is, when I am in my index.html, I simply put a ng-include to another html file like this :
<div ng-include="'folder/view.html'"></div>
The thing is... I would like to call the directive of the file first, which will call the controller right after and then call the view but I do not know how to proceed.
Here is my directive :
'use strict';
angular.module('tmp')
.directive('view', function() {
return {
restrict: 'AE',
templateUrl: "folder/view.html",
controller : "viewController",
scope: {
state: "@",
},
}
});
And here is my controller :
'use strict';
angular.module('tmp')
.controller('viewController', function ($scope) {
// Do some stuff
});
But none of these two are called. Can someone help me please ? I do not know if I am specific enough, I'd like to apologize in advance.
Plunker : https://plnkr.co/edit/EFScNxJV7qG9cTSACDZ2?p=preview
Thank you !