2016-08-12 34 views
1
<uib-alert ng-repeat= "alert in ConfigurationAlerts" close="closeAlert($index)"> {{alert.msg}} </uib-alert> 

var eWiggle = angular.module('eWiggleApp',['ui.router', 'ngAnimate', 'ui.bootstrap','blockUI','ngCookies']); 
+2

請詳細說明你的問題讓觀衆知道,這個問題您在使用的角度引導警報面對的問題。 – suneetha

+0

我正在使用ui-bootstrap-tpls-2.0.js ..試圖做uib-alert popup..Iam只能看到消息.. syling不適用。如果我恢復到舊版本,它正在 舊版本 /* * 角-UI-引導 * http://angular-ui.github.io/bootstrap/ *版本:0.13.4 - 2015-09 -03 *授權方式:MIT * / – Sudha

回答

2

從版本2.0開始,uib-alert指令已更改爲屬性而非元素,這意味着您需要將其附加到div。您還沒有指定一個類,這是決定警報顏色方案的一個因素。你的榜樣應該是這樣的:

<div uib-alert ng-class="'alert-success'" ng-repeat="alert in ConfigurationAlerts" close="closeAlert($index)"> {{alert.msg}} </div> 

The documentation has an example which is worth looking at.