Hey . What is the difference between the ng-bind and ng-bind-template directives?
It is written that the ng-bind-template directive allows you to set a binding template using expressions.
Show by example the difference between the directives.
Hey . What is the difference between the ng-bind and ng-bind-template directives?
It is written that the ng-bind-template directive allows you to set a binding template using expressions.
Show by example the difference between the directives.
While ng-bind binds the value of an element with a variable, ng-bind-template allows you to use a standard template engine:
<div ng-init="greeting = 'Hello World'; person.name = 'ganesan'; person.city ='delhi'"> <h1 ng-bind-template = '{{ greeting }} {{ person.name }}, you are living in {{ person.city}}'></h1> </div> Source: https://ru.stackoverflow.com/questions/445721/
All Articles