fix(upgrade): allow attribute selectors for components in ng2 which are not part of upgrade (#11808)

fixes #11280
This commit is contained in:
Miško Hevery
2016-09-23 10:47:16 -07:00
committed by Rado Kirov
parent 3ef5ede6d6
commit 6fc46526ae
2 changed files with 32 additions and 4 deletions

View File

@ -401,9 +401,12 @@ export class UpgradeAdapter {
._bootstrapModuleWithZone(
DynamicNgUpgradeModule, undefined, ngZone,
(componentFactories: ComponentFactory<any>[]) => {
componentFactories.forEach((componentFactory) => {
componentFactoryRefMap[getComponentInfo(componentFactory.componentType)
.selector] = componentFactory;
componentFactories.forEach((componentFactory: ComponentFactory<any>) => {
var type: Type<any> = componentFactory.componentType;
if (this.upgradedComponents.indexOf(type) !== -1) {
componentFactoryRefMap[getComponentInfo(type).selector] =
componentFactory;
}
});
})
.then((ref: NgModuleRef<any>) => {