summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/test/test.component.ts
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2019-08-22 16:55:57 +0800
committercyuamber <xuranyjy@chinamobile.com>2019-08-22 16:56:09 +0800
commitd0f5347dc16b5aa9fc95eb520fbc9a1c7b672b09 (patch)
treeb3891d8de290d755d7f0f00d35bb77d3b89ad747 /usecaseui-portal/src/app/test/test.component.ts
parent56923755c761897cc86ca2457667fcc3e6a0e43f (diff)
feat: change the project structure and add mock data function
Change-Id: I381845bff5eb37d1fab3eba8cf1ae7838df523b7 Issue-ID: USECASEUI-307 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/test/test.component.ts')
-rw-r--r--usecaseui-portal/src/app/test/test.component.ts34
1 files changed, 34 insertions, 0 deletions
diff --git a/usecaseui-portal/src/app/test/test.component.ts b/usecaseui-portal/src/app/test/test.component.ts
new file mode 100644
index 00000000..30fdedc7
--- /dev/null
+++ b/usecaseui-portal/src/app/test/test.component.ts
@@ -0,0 +1,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")
+ })
+ }
+
+
+}