mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-18 15:50:22 +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.
|
||
|---|---|---|
| .. | ||
| bootstrap.ngdoc | ||
| compiler.ngdoc | ||
| dev_guide.e2e-testing.ngdoc | ||
| dev_guide.mvc.ngdoc | ||
| dev_guide.mvc.understanding_controller.ngdoc | ||
| dev_guide.mvc.understanding_model.ngdoc | ||
| dev_guide.mvc.understanding_view.ngdoc | ||
| dev_guide.services.$location.ngdoc | ||
| dev_guide.services.creating_services.ngdoc | ||
| dev_guide.services.injecting_controllers.ngdoc | ||
| dev_guide.services.managing_dependencies.ngdoc | ||
| dev_guide.services.ngdoc | ||
| dev_guide.services.testing_services.ngdoc | ||
| dev_guide.services.understanding_services.ngdoc | ||
| dev_guide.templates.css-styling.ngdoc | ||
| dev_guide.templates.databinding.ngdoc | ||
| dev_guide.templates.filters.creating_filters.ngdoc | ||
| dev_guide.templates.filters.ngdoc | ||
| dev_guide.templates.filters.using_filters.ngdoc | ||
| dev_guide.templates.ngdoc | ||
| dev_guide.unit-testing.ngdoc | ||
| di.ngdoc | ||
| directive.ngdoc | ||
| expression.ngdoc | ||
| forms.ngdoc | ||
| i18n.ngdoc | ||
| ie.ngdoc | ||
| index.ngdoc | ||
| introduction.ngdoc | ||
| module.ngdoc | ||
| overview.ngdoc | ||
| scope.ngdoc | ||
| type.ngdoc | ||