Resolve configData in options state before load

This commit will pass in a $scope.configData array to the 'options'
state before the page loads.  This ensures that the config data
is in scope before the page loads.
This commit is contained in:
Kyle Johnson 2015-03-03 09:37:57 -05:00
parent 46d1400577
commit db0ce1f5c6
1 changed files with 9 additions and 1 deletions

View File

@ -134,7 +134,15 @@ ZoneMinder.config(function($stateProvider, $urlRouterProvider) {
.state('options', {
abstract: true,
url: '/options',
templateUrl: '/views/options/options.html'
templateUrl: '/views/options/options.html',
resolve: {
configData: function(Config) {
return Config.get();
}
},
controller: function($scope, configData) {
$scope.configData = configData.data.config;
}
})
.state('options.images', {
url: '/images',