MCPcopy Create free account
hub / github.com/angular-app/angular-app / addNotification

Function addNotification

client/src/common/services/notifications.js:10–16  ·  view source on GitHub ↗
(notificationsArray, notificationObj)

Source from the content-addressed store, hash-verified

8 var notificationsService = {};
9
10 var addNotification = function (notificationsArray, notificationObj) {
11 if (!angular.isObject(notificationObj)) {
12 throw new Error("Only object can be added to the notification service");
13 }
14 notificationsArray.push(notificationObj);
15 return notificationObj;
16 };
17
18 $rootScope.$on('$routeChangeSuccess', function () {
19 notifications.ROUTE_CURRENT.length = 0;

Callers 1

notifications.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected