Why mixing interpolation and expressions is bad practice

From the Docs:

Why mixing interpolation and expressions is bad practice:

  • It increases the complexity of the markup

  • There is no guarantee that it works for every directive, because interpolation itself is a directive. If another directive accesses attribute data before interpolation has run, it will get the raw interpolation markup and not data.

  • It impacts performance, as interpolation adds another watcher to the scope.

AngularJS Developer Guide – Interpolation

Leave a Comment