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

refactor($compile): move setup/get controller methods out of the compile node closure #13427

Closed
wants to merge 2 commits into from

Conversation

jbedard
Copy link
Collaborator

@jbedard jbedard commented Dec 2, 2015

This moves two methods out of the per-element compile closure.

getControllers has no changes

setupControllers required the newIsolateScopeDirective param and the use of hasElementTranscludeDirective was removed (.data on a comment is a noop). This can be a little simpler after something such as #13421

@jbedard jbedard force-pushed the 11618-setupget-controllers branch 2 times, most recently from 6ed81a3 to 587cdff Compare December 30, 2015 08:03
@jbedard
Copy link
Collaborator Author

jbedard commented Dec 30, 2015

I've split this into two commits so the second only moves the functions and does not change the function bodies.

var controllerInstance = $controller(controller, locals, true, directive.controllerAs);

// For directives with element transclusion the element is a comment.
// In this case jQuery .data will not attach any data.
Copy link
Member

Choose a reason for hiding this comment

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

This sounds like jqLite will attach the data (which is won't afaict).

@gkalpak
Copy link
Member

gkalpak commented Jan 21, 2016

LGTM
(This probably needs some refactoring after the recent changes in 3ffdf38, cd21216, 56c3666.)

@jbedard jbedard force-pushed the 11618-setupget-controllers branch from 587cdff to 78c75fc Compare January 23, 2016 19:53
@jbedard
Copy link
Collaborator Author

jbedard commented Jan 23, 2016

Rebased and fixed the comment

@Narretz Narretz closed this in e2898c9 Feb 29, 2016
Narretz pushed a commit that referenced this pull request Feb 29, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants