feat(core): expose inputs, outputs and ngContentSelectors on ComponentFactory. (#15214)
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:
committed by
Miško Hevery
parent
604546c287
commit
791534f2f4
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user