This repository has been archived by the owner on Feb 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(directive-injector): breaking changes and fixes
BREAKING CHANGE: Regular injectors (aka application injectors) can no longer be used to retrieve DirectiveInjectors. The compiler creates the Directive Injector as part of view creation process. DEPRECATION: - DirectiveInjector's parent accessor is now private. (The typically lookup chain as used by the Application Injectors doesn't work for Directive Injectors and it's probably wrong for application code to access the parent but see the next point.) - There's a new public method on the DirectiveInjector - `parentGet`. With parentGet, you can request types from the parent injector. Since DirectiveInjector.parent is private, you would rewrite `injector.parent.get(...)` → `injector.parentGet(...)`. TestBed does not need DI in its constructor. INTERNAL CHANGES: - Application Injector reference is passed through view creation into the new Directive Injector (instead of using parentInjector.appInjector, which is wrong when used with ng-view). - Unwind recursion from the directive injector for performance. - Remove EventListener from View. - Replace DefaultDirectiveInjector with a DirectiveInjector that has no parent. - Component visibility handled outside the visibility enum. - Removed Shadowless and ShadowDirectiveInjector subclasses. Prepares for a future change in which ComponentInjectors break the resolution chain unless called directly. Closes #1111
- Loading branch information
Showing
29 changed files
with
341 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.