Ghost/ghost/admin/initializers/notifications.js
Fabian Becker 989d19837e Close notifications on transition or user action.
closes #3012
- Inject notification object into router
- Listen to didTransition / observe currentPath to close notifications
- Close notifications on successful save actions
2014-06-24 13:51:47 +02:00

17 lines
620 B
JavaScript

import Notifications from 'ghost/utils/notifications';
var injectNotificationsInitializer = {
name: 'injectNotifications',
initialize: function (container, application) {
application.register('notifications:main', Notifications);
application.inject('controller', 'notifications', 'notifications:main');
application.inject('component', 'notifications', 'notifications:main');
application.inject('router', 'notifications', 'notifications:main');
application.inject('route', 'notifications', 'notifications:main');
}
};
export default injectNotificationsInitializer;