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:
Matt Keller
2018-07-27 15:47:12 +01:00
committed by Igor Minar
parent 21009b06a1
commit 00d3666d95
6 changed files with 112 additions and 4 deletions

View 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 {
}