Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.controller('Controller1', function($rootScope, $scope)
- {
- :
- :
- });
- app.controller('Controller2', function($rootScope, $scope)
- {
- :
- :
- });
- app.controller('Controller3', function($rootScope, $scope)
- {
- :
- :
- });
- app.factory('userConfig', function($rootScope, appConfig, UserConfig)
- {
- $rootScope.userConfig = UserConfig.get(function(data)
- {
- $rootScope.userConfig = _.clone(data.userproperties, true);
- :
- :
- });
- });
- var app = angular.module('app',[ 'commonServices']);
- app.factory('userConfig', function($rootScope, appConfig, UserConfig)
- {
- $rootScope.userConfig = UserConfig.get(function(data)
- {
- $rootScope.userConfig = _.clone(data.userproperties, true);
- :
- :
- });
- });
- app.controller('Controller1', function($rootScope, $scope)
- {
- :
- :
- });
- app.controller('Controller2', function($rootScope, $scope)
- {
- :
- :
- });
- app.controller('Controller3', function($rootScope, $scope)
- {
- :
- :
- });
- app.factory('userConfig', function($rootScope, appConfig, UserConfig) {
- UserConfig.get(function(data) {
- $rootScope.userConfig = _.clone(data.userproperties, true);
- });
- });
- <div ng-if="userConfig">
- <div ng-controller="Controller1">foo1</div>
- <div ng-controller="Controller2">foo2</div>
- <div ng-controller="Controller3">foo3</div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement