'use strict';
angular.module('sampleApplicationApp').config(function($stateProvider)
{
$stateProvider.state('abcmanagement', {
parent : 'parentmanagement',
url : '/em',
views : {
'content@' : {
templateUrl : 'scripts/app/abc.html',
controller : 'abcController'
}
}
}).state('newmodel', {
parent : 'abcmanagement',
url : '/new',
views : {
'content@' : {
templateUrl : 'scripts/app/xyz.html',
controller : 'xyzController'
}
}
})
});
angular.module('sampleApplicationApp')
.controller('abcController', function ($scope, $state, $modal) {
$scope.models = {};
// logic to load models
});
angular.module('sampleApplicationApp')
.controller('xyzController', function ($scope, $state, $modal) {
// I want to access models from above controller
});
Is there a possibility i can have access to models defined in abcController from xyzController ?