Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

fix for #11343 - bindToController for multiple directives #11344

Closed
wants to merge 2 commits into from
Closed

fix for #11343 - bindToController for multiple directives #11344

wants to merge 2 commits into from

Conversation

jtorbicki
Copy link
Contributor

Fix for issue #11343

thisLinkFn.$$destroyBindings =
for (i in elementControllers) {
// Initialize bindToController bindings for new/isolate scopes
var scopeDirective = newIsolateScopeDirective || controllerDirectives[i];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not look right - if newIsolateScopeDirective exists, it will just use that N times.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you try to combine scope: {} with scope: true on the same element you'll get an error earlier:

Multiple directives [first, second] asking for new/isolated scope on: <div first="{{1+1}}" second="{{2+2}}">

So it's either one iteration for isolated scope, or multiple for scope: true

@jtorbicki jtorbicki closed this Mar 17, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants