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:
parent
46d1400577
commit
db0ce1f5c6
|
@ -134,7 +134,15 @@ ZoneMinder.config(function($stateProvider, $urlRouterProvider) {
|
||||||
.state('options', {
|
.state('options', {
|
||||||
abstract: true,
|
abstract: true,
|
||||||
url: '/options',
|
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', {
|
.state('options.images', {
|
||||||
url: '/images',
|
url: '/images',
|
||||||
|
|
Loading…
Reference in New Issue