1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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;
| });
| }
| }
|
|