【问题标题】:Uib-alert css style is not applyingUib-alert css 样式不适用
【发布时间】:2016-11-19 00:25:20
【问题描述】:
<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']);

【问题讨论】:

  • 请详细说明您的问题,以便观众知道您在使用角度引导警报时遇到的问题。
  • 我正在使用 ui-bootstrap-tpls-2.0.js.. 尝试做 uib-alert 弹出窗口..我只能看到消息.. syling 不适用。如果我恢复到旧版本,它正在使用旧版本 /* * angular-ui-bootstrap * angular-ui.github.io/bootstrap * 版本:0.13.4 - 2015-09-03 * 许可证:麻省理工学院 */

标签: angularjs angular-ui-bootstrap


【解决方案1】:

从 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.

【讨论】:

    猜你喜欢
    • 2020-08-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-01-24
    • 2018-11-02
    • 1970-01-01
    • 2022-12-15
    • 1970-01-01
    相关资源
    最近更新 更多