This repository was archived by the owner on May 29, 2019. It is now read-only.
File tree 3 files changed +4
-4
lines changed
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ angular.module('ui.bootstrap.alert', [])
12
12
transclude :true ,
13
13
replace :true ,
14
14
scope : {
15
- type : '= ' ,
15
+ type : '@ ' ,
16
16
close : '&'
17
17
}
18
18
} ;
Original file line number Diff line number Diff line change 1
1
< div ng-controller ="AlertDemoCtrl ">
2
- < alert ng-repeat ="alert in alerts " type ="alert.type " close ="closeAlert($index) "> {{alert.msg}}</ alert >
2
+ < alert ng-repeat ="alert in alerts " type ="{{ alert.type}} " close ="closeAlert($index) "> {{alert.msg}}</ alert >
3
3
< button class ='btn btn-default ' ng-click ="addAlert() "> Add Alert</ button >
4
4
</ div >
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ describe('alert', function () {
13
13
14
14
element = angular . element (
15
15
'<div>' +
16
- '<alert ng-repeat="alert in alerts" type="alert.type"' +
16
+ '<alert ng-repeat="alert in alerts" type="{{ alert.type}} "' +
17
17
'close="removeAlert($index)">{{alert.msg}}' +
18
18
'</alert>' +
19
19
'</div>' ) ;
@@ -88,7 +88,7 @@ describe('alert', function () {
88
88
} ) ;
89
89
90
90
it ( 'should be possible to add additional classes for alert' , function ( ) {
91
- var element = $compile ( '<alert class="alert-block" type="\' info\' ">Default alert!</alert>' ) ( scope ) ;
91
+ var element = $compile ( '<alert class="alert-block" type="info">Default alert!</alert>' ) ( scope ) ;
92
92
scope . $digest ( ) ;
93
93
expect ( element ) . toHaveClass ( 'alert-block' ) ;
94
94
expect ( element ) . toHaveClass ( 'alert-info' ) ;
You can’t perform that action at this time.
0 commit comments