I'me new to Angular JS. I wanted to know how to display the tags(or directive, expression etc.) written in my htm as such (present inside the ng-app).
eg
<div ng-app="myExampleApp">
<input type="text" ng-model="firstname"/>
{{firstname}}
</div>
Now the textbox htm should be shown as such. (instead of a text box getting rendered). Please let me know how to escape them
One way is to use < and > and so on. But what about ng-model and how to prevent the expression from getting evaluated.
ng-non-bindable directive will do this!. :)
eg
<div ng-app="myExampleApp">
<input type="text" ng-model="firstname"/>
<label ng-non-bindable="">{{firstname}}</label>
</div>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.