Skip to content

Commit a93b6e8

Browse files
arturovtpkozlowski-opensource
authored andcommitted
refactor(router): remove Compiler injectee from RouterPreloader (angular#60945)
This commit removes the `Compiler` injectee from the `RouterPreloader` constructor. It's unused but was still being referenced in the factory definition: `static ɵfac = ɵɵngDeclareFactory(...)`. PR Close angular#60945
1 parent 0ac949c commit a93b6e8

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

goldens/public-api/router/index.api.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import { AfterContentInit } from '@angular/core';
88
import * as _angular_router from '@angular/router';
99
import { ChangeDetectorRef } from '@angular/core';
10-
import { Compiler } from '@angular/core';
1110
import { ComponentRef } from '@angular/core';
1211
import { ElementRef } from '@angular/core';
1312
import { EnvironmentInjector } from '@angular/core';
@@ -933,7 +932,7 @@ export interface RouterOutletContract {
933932

934933
// @public
935934
export class RouterPreloader implements OnDestroy {
936-
constructor(router: Router, compiler: Compiler, injector: EnvironmentInjector, preloadingStrategy: PreloadingStrategy, loader: RouterConfigLoader);
935+
constructor(router: Router, injector: EnvironmentInjector, preloadingStrategy: PreloadingStrategy, loader: RouterConfigLoader);
937936
// (undocumented)
938937
ngOnDestroy(): void;
939938
// (undocumented)

packages/router/src/router_preloader.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,7 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
import {
10-
Compiler,
11-
createEnvironmentInjector,
12-
EnvironmentInjector,
13-
Injectable,
14-
OnDestroy,
15-
} from '@angular/core';
9+
import {createEnvironmentInjector, EnvironmentInjector, Injectable, OnDestroy} from '@angular/core';
1610
import {from, Observable, of, Subscription} from 'rxjs';
1711
import {catchError, concatMap, filter, mergeAll, mergeMap} from 'rxjs/operators';
1812

@@ -84,7 +78,6 @@ export class RouterPreloader implements OnDestroy {
8478

8579
constructor(
8680
private router: Router,
87-
compiler: Compiler,
8881
private injector: EnvironmentInjector,
8982
private preloadingStrategy: PreloadingStrategy,
9083
private loader: RouterConfigLoader,

0 commit comments

Comments
 (0)