Answer the question
In order to leave comments, you need to log in
Why does the extra $scope appear?
Good afternoon!
We have a modal window with dynamic content, I wonder why an extra $scope appears between the modal window controller and the content controller
<div class="lightbox" ng-controller="ModalCtrl as ctrl" ng-show="show">
<div ng-include="tplUrl" class="max-height max-width"></div>
</div>
define(['app'], function(app) {
app.controller('ModalCtrl', ['$scope', 'outerConfig', function($scope) {
$scope.$on('modal', function(e, options) {
$scope.tplUrl = (options.tplUrl || 'app/modal/tpl.html');
$scope.callback = options.callback;
});
}]);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question