mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
Remove references to $rootScope.Shared & .Content in non-view code.
Instead, have them request services that return them so tests don’t need to prepare special state.
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
habitrpg.controller("InventoryCtrl", ['$rootScope', '$scope', '$window', 'User',
|
||||
function($rootScope, $scope, $window, User) {
|
||||
habitrpg.controller("InventoryCtrl", ['$rootScope', '$scope', '$window', 'User', 'Content',
|
||||
function($rootScope, $scope, $window, User, Content) {
|
||||
|
||||
var user = User.user;
|
||||
var Content = $rootScope.Content;
|
||||
|
||||
// convenience vars since these are accessed frequently
|
||||
|
||||
@@ -135,4 +134,4 @@ habitrpg.controller("InventoryCtrl", ['$rootScope', '$scope', '$window', 'User',
|
||||
$scope.closeQuest();
|
||||
}
|
||||
}
|
||||
]);
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user