0
I am having difficulty in creating a directive on the following point.
I have a data listing, and in this listing I have a callController controller, and in this listing page I have a modal that calls a template made with the directive:
angular.module('app.directives')
.directive('formCall', function(appAngularConfig) {
return {
templateUrl: appAngularConfig.baseUrl + "/build/js/views/templates/__form_call.html",
restrict: "E"
}
});
I have another controller that calls editController la has a function responsible for calling the modal and popular the inputs that are in the modal coming via template by directive, but it does not work I realize that editController does not "see" the ng-model of the template. Now if I put in the same controller where the modal this is callController works normally.
Look at the directive:
angular.module('app.directives')
.directive('formCall', function(appAngularConfig) {
return {
templateUrl: appAngularConfig.baseUrl + "/build/js/views/templates/__form_call.html",
restrict: "E",
}
});
Already from Scope as false and nothing.
You can try to communicate between them by determining the value in a
factory
and referencing it there. Or, in the first controller you can set your $Scope to $rootScope. You’ve tried something like this?– celsomtrindade