angular.js/docs/content
Misko Hevery c3a41ff9fe feat($compile): simplify isolate scope bindings
Changed the isolate scope binding options to:
  - @attr - attribute binding (including interpolation)
  - =model - by-directional model binding
  - &expr - expression execution binding

This change simplifies the terminology as well as
number of choices available to the developer. It
also supports local name aliasing from the parent.

BREAKING CHANGE: isolate scope bindings definition has changed and
the inject option for the directive controller injection was removed.

To migrate the code follow the example below:

Before:

scope: {
  myAttr: 'attribute',
  myBind: 'bind',
  myExpression: 'expression',
  myEval: 'evaluate',
  myAccessor: 'accessor'
}

After:

scope: {
  myAttr: '@',
  myBind: '@',
  myExpression: '&',
  // myEval - usually not useful, but in cases where the expression is assignable, you can use '='
  myAccessor: '=' // in directive's template change myAccessor() to myAccessor
}

The removed `inject` wasn't generaly useful for directives so there should be no code using it.
2012-06-08 15:50:13 -07:00
..
api chore(docs): re-skin main documentation 2012-05-04 16:12:17 -07:00
cookbook doc(guide): clean up broken links 2012-06-02 16:02:08 -07:00
guide feat($compile): simplify isolate scope bindings 2012-06-08 15:50:13 -07:00
misc docs(scope): rewrite 2012-06-02 16:02:07 -07:00
tutorial docs(guide): correct couple of typos 2012-06-04 18:46:09 -07:00