/** * @license * Copyright Akveo. All Rights Reserved. * Licensed under the MIT License. See License.txt in the project root for license information. */ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; @Component({ selector: 'ngx-props-block', template: ` `, changeDetection: ChangeDetectionStrategy.OnPush, }) export class NgxPropsBlockComponent { outputs: any = []; inputs: any = []; props: any = []; name: string; slag: string; @Input('source') set setSource(source: any) { this.inputs = source.props.filter(item => item.kind === 'input'); this.outputs = source.props.filter(item => item.kind === 'output'); this.props = source.props.filter(item => item.kind === 'property'); this.name = source.name; this.slag = source.slag; } }