summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/test/test.component.ts
blob: 30fdedc7f793fbeab623350ad3fe32bbaf385ca8 (plain)
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
31
32
33
34
import { Component, OnInit } from '@angular/core';
import { TextService } from '../core/services/text.service';

@Component({
  selector: 'app-test',
  templateUrl: './test.component.html',
  styleUrls: ['./test.component.less']
})
export class TestComponent implements OnInit {
  constructor(
    private TextService: TextService,
  ) {
  }

  ngOnInit() {
    this.getMockData();
    this.getjsonData();

  }
  tableData = []
  getMockData() {
    this.TextService.getfakeData().subscribe(res => {
      console.log(res, "======fake data")
      this.tableData = res;
    })
  }
  getjsonData() {
    this.TextService.getjsonData().subscribe(res => {
      console.log(res, "======json data")
    })
  }


}