mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 23:40:14 +01:00
feat: docs app
This commit is contained in:
parent
713aff561e
commit
2129689f98
203 changed files with 15927 additions and 5 deletions
|
|
@ -0,0 +1,51 @@
|
|||
|
||||
/**
|
||||
* @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: `
|
||||
<ngx-prop-block *ngIf="inputs.length > 0"
|
||||
[properties]="inputs"
|
||||
name="Inputs"
|
||||
[slag]="slag"
|
||||
class="widget-block">
|
||||
</ngx-prop-block>
|
||||
|
||||
<ngx-prop-block *ngIf="outputs.length > 0"
|
||||
[properties]="outputs"
|
||||
name="Outputs"
|
||||
[slag]="slag"
|
||||
class="widget-block">
|
||||
</ngx-prop-block>
|
||||
|
||||
<ngx-prop-block *ngIf="props.length > 0"
|
||||
[properties]="props"
|
||||
name="Properties"
|
||||
[slag]="slag"
|
||||
class="widget-block">
|
||||
</ngx-prop-block>
|
||||
`,
|
||||
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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue