Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AngularJS: Disable or remove ng-scope and ng-binding from generated HTML

Tags:

angularjs

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>
like image 536
msapkal Avatar asked Dec 16 '14 20:12

msapkal


People also ask

How to disable directive AngularJS?

Now you can disable and enable your directive by just set true or false to your scope variable $scope. isLoaderDisabled . $scope. isLoaderDisabled = false; // Initialize module.

How to disable element in AngularJS?

The ng-disabled Directive in AngularJS is used to enable or disable the HTML elements. If the expression inside the ng-disabled attribute returns true then the form field will be disabled or vice versa. It is usually applied on the form field (i.e, input, select, button, etc).

What is Ng bind HTML in AngularJS?

The ng-bind-html directive is a secure way of binding content to an HTML element. When you are letting AngularJS write HTML in your application, you should check the HTML for dangerous code. By including the "angular-sanitize.

How to use ng-disabled in Angular?

Definition and UsageThe ng-disabled directive sets the disabled attribute of a form field (input, select, or textarea). The form field will be disabled if the expression inside the ng-disabled attribute returns true. The ng-disabled directive is necessary to be able to shift the value between true and false .


1 Answers

Yes,

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

Documentation here: https://docs.angularjs.org/guide/production

like image 170
Kyle Muir Avatar answered Nov 15 '22 09:11

Kyle Muir