Skip to content

Commit a49589b

Browse files
author
ismcagdas
committed
added clint side notification received events.
1 parent dc151ba commit a49589b

File tree

2 files changed

+25
-19
lines changed
  • src
    • AbpCompanyName.AbpProjectName.WebMpa/js
    • AbpCompanyName.AbpProjectName.WebSpaAngular/App/Main/views/layout

2 files changed

+25
-19
lines changed
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
(function() {
2-
//...
1+
(function() {
2+
abp.event.on('abp.notifications.received', function (userNotification) {
3+
console.log(userNotification);
4+
});
35
})();
Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
1-
(function () {
2-
var controllerId = 'app.views.layout.header';
3-
angular.module('app').controller(controllerId, [
4-
'$rootScope', '$state', function ($rootScope, $state) {
5-
var vm = this;
6-
7-
vm.languages = abp.localization.languages;
8-
vm.currentLanguage = abp.localization.currentLanguage;
9-
10-
vm.menu = abp.nav.menus.MainMenu;
11-
vm.currentMenuName = $state.current.menu;
12-
13-
$rootScope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState, fromParams) {
14-
vm.currentMenuName = toState.menu;
15-
});
16-
}
17-
]);
1+
(function () {
2+
var controllerId = 'app.views.layout.header';
3+
angular.module('app').controller(controllerId, [
4+
'$rootScope', '$state', function ($rootScope, $state) {
5+
var vm = this;
6+
7+
vm.languages = abp.localization.languages;
8+
vm.currentLanguage = abp.localization.currentLanguage;
9+
10+
vm.menu = abp.nav.menus.MainMenu;
11+
vm.currentMenuName = $state.current.menu;
12+
13+
$rootScope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState, fromParams) {
14+
vm.currentMenuName = toState.menu;
15+
});
16+
17+
abp.event.on('abp.notifications.received', function (userNotification) {
18+
console.log(userNotification);
19+
});
20+
}
21+
]);
1822
})();

0 commit comments

Comments
 (0)