我在角只是新和我使用angularstrap和使用NG-重複
這裏是我的角碼
let alertExcpetion = $alert({
placement: 'top-right',
type: 'warning',
show: true,
keyboard: true
template: 'alert.template.html'
});
,這裏是警戒重複的對象數據製作定製報警.template.html
<div class="alert" ng-class="[type ? 'alert-' + type : null]">
<button type="button" class="close" ng-if="dismissable" ng-click="$hide()">×</button>
<div class="title">
{{ someScopeTitle }}
</div>
<div>
<table class="table table-alert">
<tbody>
<tr ng-repeat="student in students">
<td>{{ student.id }}</td>
<td><a href="#" ng-click="myfunction(student.someObject)">View File</a> {{student.fullname}}</td>
</tr>
</tbody>
</table>
</div>
</div>
加載後.alert爲空,因爲它沒有讀取範圍。有沒有任何可能的方式將範圍傳遞給angularstrap的$ alert?
角帶版本v2.1.6 - 2015年1月11日
已經試過了,只是從我的IDE中得到錯誤,說'範圍'不存在於'IAlertOptions''類型中。 – Liky
@Liky您能否創建一個plunker示例? – Muhsin
我只是使用過時的角度帶,這就是爲什麼我有一個錯誤。使用你的代碼,它的工作。謝謝! – Liky