|
@@ -34,8 +34,24 @@ app.config(['$stateProvider', '$urlRouterProvider', '$httpProvider', '$locationP
|
34
|
34
|
}
|
35
|
35
|
};
|
36
|
36
|
}])
|
37
|
|
- .run(['$rootScope', '$state',function ($rootScope, $state) {
|
38
|
|
- $rootScope.$on('$stateChangeError', function (e, curr, prev) {
|
39
|
|
- //$state.go('/');
|
40
|
|
- });
|
|
37
|
+ .run(['$rootScope', '$state', '$location', 'DataShareBusiness', 'GroupsBusiness',
|
|
38
|
+ function ($rootScope, $state, $location, DataShareBusiness, GroupsBusiness) {
|
|
39
|
+ $rootScope.$on('$stateChangeError', function (e, curr, prev) {
|
|
40
|
+ //$state.go('/');
|
|
41
|
+ });
|
|
42
|
+
|
|
43
|
+ $rootScope.$watch(function(){ return Object.keys($location.search())[0] }, function(){
|
|
44
|
+ if (DataShareBusiness.Groups != null) {
|
|
45
|
+ DataShareBusiness.setFromSearchString(Object.keys($location.search())[0]);
|
|
46
|
+ }
|
|
47
|
+ });
|
|
48
|
+
|
|
49
|
+ var promiseLoadGroups = {
|
|
50
|
+ id: "promiseLoadGroups",
|
|
51
|
+ loaderGroups: ["sidebar", "toolbar"]
|
|
52
|
+ };
|
|
53
|
+ GroupsBusiness.loadAll(promiseLoadGroups).then(function(data)
|
|
54
|
+ {
|
|
55
|
+ DataShareBusiness.setFromSearchString(Object.keys($location.search())[0]);
|
|
56
|
+ });
|
41
|
57
|
}]);
|