Soarway Angular项目代码片段和小功能的插件。之前的smart-pcq-snippets全部移到此插件实现。
- 右键工作目录可快速生成less.ts、service.ts和README.md
- 右键工作目录可执行更便捷的执行ng-jojo的命令
*ngFor="let item of items;trackBy: trackByIndex;"
*ngIf=""
<form nz-form [formGroup]="form" (ngSubmit)="submit(event)">
</form>
<nz-form-item nz-row>
<nz-form-control [nzSpan]="controlSpan">
<input nz-input formControlName="" id="" placeholder="">
</nz-form-control>
</nz-form-item>
*说明:sm-form-select、sm-form-input-number、sm-form-radio-group、sm-form-switch 同上
<ng-template #ErrorTpl>
</ng-template>
*说明:sm-template-warning、 sm-template-success 同上
<nz-modal [(nzVisible)]="isVisible" nzTitle="'title'" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
</nz-modal>
<nz-card nzTitle="'title'" [nzExtra]="extraTpl">
<ng-template #extraTpl>
<button nz-button nzShape="circle" [nzLoading]="http.loading" (click)="reload()">
<i nz-icon nzType="reload" nzTheme="outline"></i>
</button>
</ng-template>
</nz-card>
<nz-drawer [nzVisible]="isVisible" nzTitle="'title'" (nzOnClose)="handleClose()">
</nz-drawer>
<button nz-button nzShape="circle" [nzLoading]="http.loading" (click)="reload()">
<i nz-icon nzType="reload" nzTheme="outline"></i>
</button>
if (res.status.isSuccess) {
this.msg.success(``);
} else {
this.msg.error(``);
}
this.form = this.fb.group({
});
get () {
return this.form.controls.;
}
this.msg.success(``);
*说明:sm-msg-error、sm-msg-warning、 sm-msg-info同上
submit() {
}
reload() {
}
con => console.log()
cons => constructor() { }
expcl => export class { }
expif => expor interface { }
jsons => JSON.stringify()
jsonp => JSON.parse()