Skip to content

Commit 26df978

Browse files
feat(chapter-10): Work on alert directive
1 parent 0d05820 commit 26df978

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

1820EN_10_Code/01_alert_directive/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ angular.module('app', ['alert-directive'])
77
];
88

99
$scope.addAlert = function() {
10-
$scope.alerts.push({type: 'warning', msg: "Watch out - another alert!"});
10+
$scope.alerts.push({msg: "Watch out - another alert!"});
1111
};
1212

1313
$scope.closeAlert = function(index) {

1820EN_10_Code/01_alert_directive/directive.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ angular.module("alert-directive", [])
55
restrict:'EA',
66
replace: true,
77
template:
8-
'<div class="alert alert-block" ng-class="\'alert-\' + type">' +
8+
'<div class="alert alert-block alert-{{type || \'info\'}}">' +
99
'<button type="button" class="close" ng-click="close()">&times;</button>' +
1010
'<div ng-transclude></div>' +
1111
'</div>',

0 commit comments

Comments
 (0)