Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(router): organize deprecated loadChildren code (#47586)
This commit breaks out the code in @angular/router needed to support the deprecated `loadChildren` signature into a separate file, which reduces the opportunity for conflicts when patching that behavior in g3. PR Close #47586
- Loading branch information
1 parent
2919463
commit a2a066d
Showing
5 changed files
with
38 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* @license | ||
* Copyright Google LLC All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
|
||
import {Injector, NgModuleFactory} from '@angular/core'; | ||
import {Observable} from 'rxjs'; | ||
|
||
// This file exists to support the legacy `loadChildren: string` behavior being patched back into | ||
// Angular. | ||
|
||
/** | ||
* Deprecated `loadChildren` value types. | ||
* | ||
* @publicApi | ||
* @deprecated represents the deprecated type side of `LoadChildren`. | ||
*/ | ||
export type DeprecatedLoadChildren = never; | ||
|
||
export function deprecatedLoadChildrenString( | ||
injector: Injector, loadChildren: unknown): Observable<NgModuleFactory<any>>|null { | ||
return null; | ||
} |
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