javascript

  • You can bind the value of an expression/attribute once (will be bound when != ‘undefined’).
  • The example with ng-bind would be more comparable to
    Hello, {{variable}}

    .

  • When you try to use angular filters , limit or something else, you maybe can have problem if you use ng-bind .
  • The ng-bind is a directive and will place a watcher on the passed variable.
  • So we should use ng-bind instead of expression for data depiction.

I was in one of the angular presentation and one of the person in the meeting mentioned ng-bind is better than {{}} binding.

@kmorcinek: Why ng-bind is better than {{}} in angular?

If you need an filter function, better go for a directive, that actually just uses your custom filter. Documentation for $filter service

This is useful, when you dont expect your binding to change.

javascript