mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-22 01:10:23 +00:00
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.
|
||
|---|---|---|
| .. | ||
| a.js | ||
| booleanAttrs.js | ||
| directives.js | ||
| form.js | ||
| input.js | ||
| ngBind.js | ||
| ngClass.js | ||
| ngCloak.js | ||
| ngController.js | ||
| ngCsp.js | ||
| ngEventDirs.js | ||
| ngInclude.js | ||
| ngInit.js | ||
| ngNonBindable.js | ||
| ngPluralize.js | ||
| ngRepeat.js | ||
| ngShowHide.js | ||
| ngStyle.js | ||
| ngSwitch.js | ||
| ngTransclude.js | ||
| ngView.js | ||
| script.js | ||
| select.js | ||
| style.js | ||