Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. app.controller('Controller1', function($rootScope, $scope)
  2. {
  3. :
  4. :
  5. });
  6.  
  7. app.controller('Controller2', function($rootScope, $scope)
  8. {
  9. :
  10. :
  11. });
  12.  
  13. app.controller('Controller3', function($rootScope, $scope)
  14. {
  15. :
  16. :
  17. });
  18.  
  19. app.factory('userConfig', function($rootScope, appConfig, UserConfig)
  20. {
  21. $rootScope.userConfig = UserConfig.get(function(data)
  22. {
  23. $rootScope.userConfig = _.clone(data.userproperties, true);
  24. :
  25. :
  26. });
  27. });
  28.  
  29. var app = angular.module('app',[ 'commonServices']);
  30.  
  31. app.factory('userConfig', function($rootScope, appConfig, UserConfig)
  32. {
  33. $rootScope.userConfig = UserConfig.get(function(data)
  34. {
  35. $rootScope.userConfig = _.clone(data.userproperties, true);
  36. :
  37. :
  38. });
  39. });
  40.  
  41. app.controller('Controller1', function($rootScope, $scope)
  42. {
  43. :
  44. :
  45. });
  46.  
  47. app.controller('Controller2', function($rootScope, $scope)
  48. {
  49. :
  50. :
  51. });
  52.  
  53. app.controller('Controller3', function($rootScope, $scope)
  54. {
  55. :
  56. :
  57. });
  58.  
  59. app.factory('userConfig', function($rootScope, appConfig, UserConfig) {
  60. UserConfig.get(function(data) {
  61. $rootScope.userConfig = _.clone(data.userproperties, true);
  62. });
  63. });
  64.  
  65. <div ng-if="userConfig">
  66. <div ng-controller="Controller1">foo1</div>
  67. <div ng-controller="Controller2">foo2</div>
  68. <div ng-controller="Controller3">foo3</div>
  69. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement