jeffcarp/frontend-hyperpolyglot

One way data binding in Angular 1

Closed this issue · 2 comments

The correct syntax is <Child foo='::scope.bar' />

https://docs.angularjs.org/guide/expression

Thank you @fadamakis!

Thinking about this more - I think this might require a new section. These are two distinct behaviors:

  1. One-way data binding - where a parent's property is passed down but still updated
  2. One-time data binding - where a parent's property is passed down once and never updated again (e.g. your example <Child foo='::scope.bar' />)