Skip to content

Commit 9081d25

Browse files
author
Jurgen Van de Moere
committed
Update growlNotifications directive to support css prefix
1 parent f94c020 commit 9081d25

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/growlNotifications/directives/growlNotifications.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,20 @@ angular.module('growlNotifications.directives')
33

44
return {
55
restrict: 'AE',
6-
replace: true,
6+
replace: false,
77
scope: {},
8-
template: '<ul class="list-unstyled"><li ng-repeat="(id, notification) in notifications"><div class="alert alert-{{notification.type}}"><div ng-bind-html="notification.message"></div></div></li></ul>',
8+
template: [
9+
'<ul class="list-unstyled">',
10+
' <li ng-repeat="(id, notification) in notifications">',
11+
' <div class="{{cssPrefix}} {{cssPrefix}}-{{notification.type}}">',
12+
' <div ng-bind-html="notification.message">',
13+
' </div>',
14+
' </div>',
15+
' </li>',
16+
'</ul>'
17+
].join('\n'),
918
link: function(scope){
19+
scope.cssPrefix = growlNotifications.options.cssPrefix;
1020
scope.notifications = growlNotifications.notifications;
1121
}
1222
};

0 commit comments

Comments
 (0)