This repository has been archived by the owner on May 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(alert): don't show close button if no close callback specified
- Loading branch information
1 parent
556a37e
commit c2645f4
Showing
5 changed files
with
33 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<div ng-controller="AlertDemoCtrl"> | ||
<alert ng-repeat="alert in alerts" type="alert.type" close="closeAlert($index)">{{alert.msg}}</alert> | ||
<button class='btn' ng-click="addAlert()">Add Alert</button> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
Alert is an AngularJS-version of bootstrap's alert. | ||
|
||
This directive can be used to generate alerts from the dynamic model data (using the ng-repeat directive); | ||
This directive can be used to generate alerts from the dynamic model data (using the ng-repeat directive); | ||
|
||
The presence of the "close" attribute determines if a close button is displayed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<div class='alert' ng-class='type && "alert-" + type'> | ||
<button type='button' class='close' ng-click='close()'>×</button> | ||
<button ng-show='closeable' type='button' class='close' ng-click='close()'>×</button> | ||
<div ng-transclude></div> | ||
</div> | ||
</div> |