From 1a30ba4211462589698d26688ec24319e48b740c Mon Sep 17 00:00:00 2001 From: fengxiang <110431245@qq.com> Date: Wed, 11 Jul 2018 15:08:40 +0800 Subject: [PATCH] 提交 --- src/app/routes/pro/list/basic-list/basic-list.component.ts | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/src/app/routes/pro/list/basic-list/basic-list.component.ts b/src/app/routes/pro/list/basic-list/basic-list.component.ts new file mode 100644 index 0000000..ae20a91 --- /dev/null +++ b/src/app/routes/pro/list/basic-list/basic-list.component.ts @@ -0,0 +1,30 @@ +import { Component, OnInit } from '@angular/core'; +import { NzMessageService } from 'ng-zorro-antd'; +import { _HttpClient } from '@delon/theme'; + +@Component({ + selector: 'pro-basic-list', + templateUrl: './basic-list.component.html', + styleUrls: ['./basic-list.component.less'], +}) +export class ProBasicListComponent implements OnInit { + q: any = { + status: 'all', + }; + loading = false; + data: any[] = []; + + constructor(private http: _HttpClient, public msg: NzMessageService) {} + + ngOnInit() { + this.getData(); + } + + getData() { + this.loading = true; + this.http.get('/api/list', { count: 5 }).subscribe((res: any) => { + this.data = res; + this.loading = false; + }); + } +} -- Gitblit v1.8.0