I have the following:
var admin = {
name: 'admin',
url: '/admin',
views: {
'nav-sub': {
templateUrl: '/Content/app/admin/partials/nav-sub.html',
controller: function ($scope) { $scope.message = "hello"; }
}
},
controller: ['$scope', function ($scope) {
$scope.message = "hello";
}]
}
var subject = {
name: 'subject',
parent: admin,
url: '/subject',
views: {
'grid@': {
templateUrl: '/Content/app/admin/partials/grid-subject.html',
controller: 'AdminGridSubjectController',
}
}
};
I would like the AdminGridSubjectController to know what the $scope.message value is but it seems not to know anything about it. Is there something I am doing wrong?
stApp.controller('AdminGridSubjectController', ['$scope', function ( $scope ) {
var a = $scope.message;
}]);