Skip to main content
too much IMHO....
Source Link
Fabio Bonfante
  • 5.2k
  • 1
  • 34
  • 38

IMHO the better way to do this is use the $rootScope In html every scope inherits from the $rootScope, so if a variable isn't present in the current scope angular use the one declared in $rootScope.

A good (IMHO) way is to initialize this in the run "phase"

angular.module('myApp')
  .run(function ($rootScope) {
      $rootScope.ROUTES = ROUTES
   });

 

IMHO the better way to do this is use the $rootScope In html every scope inherits from the $rootScope, so if a variable isn't present in the current scope angular use the one declared in $rootScope.

A good (IMHO) way is to initialize this in the run "phase"

angular.module('myApp')
  .run(function ($rootScope) {
      $rootScope.ROUTES = ROUTES
   });

 

IMHO the better way to do this is use the $rootScope In html every scope inherits from the $rootScope, so if a variable isn't present in the current scope angular use the one declared in $rootScope.

A good way is to initialize this in the run "phase"

angular.module('myApp')
  .run(function ($rootScope) {
      $rootScope.ROUTES = ROUTES
   });

 

One closing parenthesis too many and added   because an edit need to be 6 chars minimum :|
Source Link

IMHO the better way to do this is use the $rootScope In html every scope inherits from the $rootScope, so if a variable isn't present in the current scope angular use the one declared in $rootScope.

A good (IMHO) way is to initialize this in the run "phase"

angular.module('myApp')
  .run(function ($rootScope) {
 
      $rootScope.ROUTES = ROUTES
   }));
 

 

IMHO the better way to do this is use the $rootScope In html every scope inherits from the $rootScope, so if a variable isn't present in the current scope angular use the one declared in $rootScope.

A good (IMHO) way is to initialize this in the run "phase"

angular.module('myApp')
  .run(function ($rootScope) {
 
  $rootScope.ROUTES = ROUTES
}));

IMHO the better way to do this is use the $rootScope In html every scope inherits from the $rootScope, so if a variable isn't present in the current scope angular use the one declared in $rootScope.

A good (IMHO) way is to initialize this in the run "phase"

angular.module('myApp')
  .run(function ($rootScope) {
      $rootScope.ROUTES = ROUTES
   });
 

 

Source Link
Fabio Bonfante
  • 5.2k
  • 1
  • 34
  • 38

IMHO the better way to do this is use the $rootScope In html every scope inherits from the $rootScope, so if a variable isn't present in the current scope angular use the one declared in $rootScope.

A good (IMHO) way is to initialize this in the run "phase"

angular.module('myApp')
  .run(function ($rootScope) {

  $rootScope.ROUTES = ROUTES
}));