Angular ng-bind or interpolation when used inside other attributes?

88 views Asked by At

I'm quite new to Angular 1.5+ and I was trying to understand why should I use ng-bind instead of interpolation. It seems that it's much more efficient, and it will prevent the unrendered {{ }}.

But what should I use, if I'm using it inside other html attributes or other angular directives ? Is it good practice to mix both ?

<h1>Hello <span ng-bind="$ctrl.child"></span></h1>
<img src="resources/images/countries/{{$ctrl.addressCtry}}.png"
     alt="{{$ctrl.addressCtry}}">
0

There are 0 answers