feat(core): expose inputs, outputs and ngContentSelectors on ComponentFactory.

E.g. for a component like this:
```
@Component({
  template: ‘<ng-content select=“child”></ng-content>’
})
class MyComp {
  @Input(‘aInputName’)
  aInputProp: string;

  @Output(‘aEventName’)
  aOuputProp: EventEmitter<any>;
}
```

the `ComponentFactory` will now contain the following:
- `inputs = {aInputProp: ‘aInputName’}`
- `outputs = {aOutputProp: ‘aOutputName’}`
- `ngContentSelectors = [‘child’]`
This commit is contained in:
Tobias Bosch
2017-03-14 14:54:36 -07:00
committed by Chuck Jazdzewski
parent 8e2c8b3e4d
commit 1171f91a80
9 changed files with 134 additions and 11 deletions

View File

@ -97,7 +97,8 @@ export class AppModule implements Injector, NgModuleRef<any> {
this.renderer2 = new DomRendererFactory2(null, null);
trustedEmptyColor = this.sanitizer.bypassSecurityTrustStyle('');
trustedGreyColor = this.sanitizer.bypassSecurityTrustStyle('grey');
this.componentFactory = createComponentFactory('#root', TreeComponent, TreeComponent_Host);
this.componentFactory =
createComponentFactory('#root', TreeComponent, TreeComponent_Host, {}, {}, []);
}
get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND): any {