-
Notifications
You must be signed in to change notification settings - Fork 27.5k
refactor($compile): allow adding directive collectors and extractors #6781
Conversation
Thanks for the PR! Please check the items below to help us merge this faster. See the contributing docs for more information.
If you need to make changes to your pull request, you can update the commit with Thanks again for your help! |
function locateDirectives(name) { | ||
var result = []; | ||
forEach(environment.directiveLocators, function(locator) { | ||
result = result.concat(locator(name) || []); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this potentially creates a lot of garbage for the GC to clean up... the compiler isn't really something which is called too frequently most of the time, but this potentially hurts more than it helps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, can be changed to
var directives = locator(name);
if (directives) result.push.apply(result, directives);
Refactor `$compile` so it is able to accept directive collectors and directive extractors. Add all the current directive collectos and directive extractors that handle the current operations
02dc2aa
to
fd2d6c0
Compare
cad9560
to
f294244
Compare
e8dc429
to
e83fab9
Compare
4dd5a20
to
998c61c
Compare
This is out of scope at this point in AngularJS development. |
Refactor
$compile
so it is able to accept directive collectors and directive extractors. Add all the current directive collectors and directive extractors that handle the current operationsThis patch is to start the conversation if the refactor into directive collectors and directive extractors should be done at 1.3 or if this should wait to 2.0