-
Notifications
You must be signed in to change notification settings - Fork 27.5k
fix(compile): fix directives with controller, templateUrl and compile properties #3514
Conversation
Thanks for the PR!
If you need to make changes to your pull request, you can update the commit with Thanks again for your help! |
controllerDirectives[directiveName], directive, $compileNode); | ||
controllerDirectives[directiveName] = directive; | ||
} | ||
directiveValue = directive.controller; |
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.
given your change, this line looks unnecessary
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.
~500 tests break when I remove it.
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.
Actually, I tried to remove it again and it works.
Thanks Jan! I reviewed the code and this is the correct fix. |
This fixes regression introduced by angular#3514 (5c56011) - this commit is being reverted here and a better fix is included. The regression caused the controller to be instantiated before the isolate scope was initialized. Closes angular#3493 Closes angular#3482 Closes angular#3537
This fixes regression introduced by angular#3514 (9c51d50) - this commit is being reverted here and a better fix is included. The regression caused the controller to be instantiated before the isolate scope was initialized. Closes angular#3493 Closes angular#3482 Closes angular#3537 Closes angular#3540
This PR addresses the following JSBin: http://jsbin.com/azomeh/9/edit
Directives combining templateUrl and a controller were not getting compiled correctly. The second call to
applyDirectivesToNode
was being made with thecontroller
property of the directive set tonull
which made it impossible for the compiler to find the controller constructor function.