AngularJS:从生成的 HTML 中禁用或删除 ng-scope 和 ng-binding [英] AngularJS: Disable or remove ng-scope and ng-binding from generated HTML

查看:24
本文介绍了AngularJS:从生成的 HTML 中禁用或删除 ng-scope 和 ng-binding的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以删除 AngularJS 生成的 HTML 中动态添加的 ng-scope 和 ng-binding 属性值吗?

Is there any way to remove ng-scope and ng-binding attribute values which are added dynamically in HTML generated by AngularJS ?

<tr ng-repeat="student in students" ng-class="isGrey[$index]" ng-click="toggleClass($index)" class="ng-scope">
     <td class="ng-binding">1</td>
     <td class="ng-binding">Mahesh</td>
     <td class="ng-binding">Sapkal</td>
</tr>

推荐答案

是,

myApp.config(['$compileProvider', function ($compileProvider) {
    $compileProvider.debugInfoEnabled(false);
}]);

此处的文档:https://docs.angularjs.org/guide/production

这篇关于AngularJS:从生成的 HTML 中禁用或删除 ng-scope 和 ng-binding的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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