I have a standard app:
angular.module('angularFrontApp', [
'ngRoute',
'ngResource',
'ngAnimate'
]).config(AppConfig);
and some controller
angular.module('angularFrontApp')
.controller('formsController', formsController);
formsController.$inject = ['$scope', 'AjaxForms', 'appConst'];
function formsController ($scope, AjaxForms, appConst) {
//.....
}
I am trying call a controller in ng-include, but it fails in dynamicTemplate (its dynamic var like some.html):
<div ng-include="dynamicTemplate"></div>
<div ng-controller="formsController">some stuff....</div>
But if I call the controller outside of include - it works fine. Why doesn't angular see controllers and other things in includes?