Skip to content

Commit d99eaf3

Browse files
AllenBWAllenBW
authored andcommitted
pfnotification service does not make data available to html template
The related provider should be rewritten, no question about that. Until that time, this fix makes $rootScope.notification available to the pfNotificationList directive. Previous behavior, where <pf-notification-list></pf-notification-list> was declared, notifications would not appear when the Notification (Notification.error for example) provider was invoked. Present behavior (with this commit) <pf-notification-list></pf-notification-list> will now display the list of cued notifications no matter where it's declared.
1 parent 36ace7f commit d99eaf3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/notification/notification.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,11 @@ angular.module( 'patternfly.notification' ).directive('pfNotificationList', func
325325

326326
return {
327327
restrict: 'E',
328+
controller: NotificationListController,
328329
templateUrl: 'notification/notification-list.html'
329330
};
331+
332+
function NotificationListController ($scope, $rootScope) {
333+
$scope.notifications = $rootScope.notifications;
334+
}
330335
});

0 commit comments

Comments
 (0)