ui.bootstrap 使 <progress> 变形HTML 标签 [英] ui.bootstrap deforms the &lt;progress&gt; HTML tag

查看:25
本文介绍了ui.bootstrap 使 <progress> 变形HTML 标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 HTML 文件中,我有一个 <progress> 标记,并且我还将 ui.bootstrap 依赖项注入到我的控制器中,如下所示:

In my HTML file I have a <progress> tag and I also injected the ui.bootstrap dependency to my controller as follows:

var myApp = angular.module("myApp",["ui.bootstrap"]);

在这个配置中,AngularJS 将 转换成:

In this configuration, AngularJS converts the <progress></progress> into:

<div class="progress ng-isolate-scope" ng-transclude=""></div>

当我删除ui.bootstrap"时它工作正常.您可以使用这个示例 JSFiddle.

When I remove "ui.bootstrap" it works fine. You can play out with this sample JSFiddle.

progress变成<div class="progress ng-isolate-scope" ng-transclude=""></div>它消失了.我知道在 ui.bootstrap 中有一个名为 progress 的指令可以进行这种转换.

When progress turned into <div class="progress ng-isolate-scope" ng-transclude=""></div> it disappears. I understand that there is a directive called progress in ui.bootstrap that makes this conversion.

那么,我怎样才能让这个进度条工作呢?或者,如何在不删除依赖项的情况下禁用 angular-ui 的 progress 指令?

So, how can I make this progress bar work? Or, how can I disable the progress directive of angular-ui without removing the dependency?

提前致谢.

推荐答案

我刚刚遇到了同样的问题.一个简单的解决方法是使用 ng-non-bindable,这是一个标准的 angualr 指令.缺点是您不能在 progress 元素中使用任何角度指令或绑定.

I just ran into this same issue. A simple workaround is to use ng-non-bindable which is a standard angualr directive. The drawback is you can't use any angular directives or bindings within the progress element.

<progress ng-non-bindable></progress>

这篇关于ui.bootstrap 使 <progress> 变形HTML 标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆