These are chat archives for angular/angular.js
due tomight be somewhat relevant.
Uncaught Error: [$injector:modulerr] Failed to instantiate module temp2 due to:
Error: [$injector:modulerr] Failed to instantiate module ui.grid due to:
Error: [$injector:nomod] Module 'ui.grid' is not available!
httpwhen plunkr is on
$rootScope.User = this;in something called
thiswill point to the instance of
UserService. So I don't realy like to put an instance of
UserServicein a variable named
User. Even tho this will work, I don't think it's the best approach.
$rootScopeshouldn't be neccesary.
this.user = UserService.currentin every view-controller would be smarter
UserService.currenton my top-level controller before. This way it can be easily accessed in the view. But for accessing it inside other controllers, DI is much better (more declarative, more robust, more test-friendly).
$rootScope.User = this. I'd use something like:
$rootScope.User = userService.currentUser;in e.g. a
multi-line template strings are invalid in internet explorer??