Skip to content

Commit 8508d35

Browse files
committed
refactor(router): re-export the RouterTestingModule symbols
This commit re-exports the symbols that are exposed by the `RouterTestingModule` (which re-exports the symbols from the `RouterModule`. These re-exports are needed for the Angular compiler to overcome its limitation (on the consumer side) of not knowing where to import import symbols when relative imports are used within the package.
1 parent 7f690b8 commit 8508d35

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/router/testing/src/testing.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,14 @@
1313
*/
1414
export * from './router_testing_module';
1515
export {RouterTestingHarness} from './router_testing_harness';
16+
17+
// Re-export the symbols that are exposed by the `RouterTestingModule` (which re-exports
18+
// the symbols from the `RouterModule`). Re-exports are needed for the Angular compiler
19+
// to overcome its limitation (on the consumer side) of not knowing where to import import
20+
// symbols when relative imports are used within the package.
21+
// Note: These exports need to be stable and shouldn't be renamed unnecessarily because
22+
// consuming libraries might have references to them in their own partial compilation output.
23+
export {RouterOutlet as ɵɵRouterOutlet} from '../../src/directives/router_outlet';
24+
export {RouterLink as ɵɵRouterLink} from '../../src/directives/router_link';
25+
export {RouterLinkActive as ɵɵRouterLinkActive} from '../../src/directives/router_link_active';
26+
export {EmptyOutletComponent as ɵɵEmptyOutletComponent} from '../../src/components/empty_outlet';

0 commit comments

Comments
 (0)