The ng-non-bindable
directive is used to remove binding for a specific portion of the page, the
div/panel which is marked with this directive will not bind any values from the
model.
The following example shows
the usage of ng-non-bindable
directive
<html ng-app>
<head>
<meta charset="utf-8" />
<title>AngularJS - Basic</title>
<script src="angular.min.js"></script>
</head>
<body>
<div ng-init="Name='FirstName, LastName'" ng-non-bindable>
Your Name is: {{Name}}
</div>
</body>
</html>
Output without the ng-non-bindable directive in the div tag
<html ng-app>
<head>
<meta charset="utf-8" />
<title>AngularJS - Basic</title>
<script src="angular.min.js"></script>
</head>
<body>
<div ng-init="Name='FirstName, LastName'" ng-non-bindable>
Your Name is: {{Name}}
</div>
</body>
</html>
Output without the ng-non-bindable directive in the div tag
Output with the
ng-non-bindable directive in the div tag
No comments:
Post a Comment