The ng-nonbindable directive in AngularJS used to specifies the content of this HTML element should not be compiled by AngularJS or it specifies that no data binding in the element.
It is supported by all HTML elements.
The ng-nonbindable directive does not have any parameter values.
Syntax for ng-nonbindable Directive in AngularJS:
Sample coding for ng-non-bindable Directive in AngularJS
ng-non-bindable Directive using in AngularJS:
The ng-non-bindable directive does not compile the AngularJS code.
Code Explanation for ng-non-bindable Directive in AngularJS:
The ng-app specifies the root element (<div>) to define AngularJS application.
The ng-init is used to initialize the values for an application. (here the value Welcome to Wikitechy is mentioned for “text”)
The expression text is executed and the output will be updated in <p> tag.
The ng-non-bindable directive does not the compile the expression in AngularJS. The expression text does not execute (here the expression text is mentioned for ng-non-bindable)
The expression 20+50 is executed and the output will be updated in <p> tag.
The expression 20+50 is not executed (here the expression 20+50 is mentioned for ng-non-bindable directive)
Sample Output for ng-non-bindable Directive in AngularJS:
The content welcome to wikitechy is displayed in the output.
The output shows the text (welcome to wikitechy) is not executed.
The output displays the addition of two numbers is 70.
The addition of two numbers {{20+50}} does not executed is displayed in the output.