fix(compiler): Fix look up of entryComponents in AOT Summaries (#24892)
Previously, when you attempted to bootstrap a component that had a router-outlet using ngsummaries, it would complain that the component was not provided by any module even if it was. This commit fixes a mistake (AFAICT) which caused the lookup of the component in the AOT summaries to fail. I believe this change is safe. I've run the affected tests within Google and there were no breakages caused by this change. PR Close #24892
This commit is contained in:
44
packages/router/test/aot_ngsummary_test/aot_router_module.ts
Normal file
44
packages/router/test/aot_ngsummary_test/aot_router_module.ts
Normal file
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. 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 {Component, NgModule} from '@angular/core';
|
||||
import {RouterModule, Routes} from '../../';
|
||||
|
||||
@Component({
|
||||
selector: 'aot-router',
|
||||
template: '<router-outlet></router-outlet>',
|
||||
})
|
||||
export class AotRouterCmp {
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'aot-router-child',
|
||||
template: 'arc',
|
||||
})
|
||||
export class AotRouterChildCmp {
|
||||
}
|
||||
|
||||
export const ROUTES: Routes = [
|
||||
{path: '', component: AotRouterChildCmp},
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AotRouterCmp,
|
||||
AotRouterChildCmp,
|
||||
],
|
||||
exports: [
|
||||
AotRouterCmp,
|
||||
AotRouterChildCmp,
|
||||
],
|
||||
imports: [
|
||||
RouterModule.forRoot(ROUTES),
|
||||
],
|
||||
})
|
||||
export class AotRouterModule {
|
||||
}
|
Reference in New Issue
Block a user