From 670c9a0b9ce1f9c25a1031fbbc1890551bbdab1f Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Tue, 24 Sep 2019 21:26:29 +0400 Subject: [PATCH] [ui] feat: Add table view (with test data) --- ClientApp/src/app/home/home.component.html | 31 ++++++++++++---------- ClientApp/src/app/home/home.component.ts | 16 ++++++++++- 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/ClientApp/src/app/home/home.component.html b/ClientApp/src/app/home/home.component.html index f74c2e7..d4c4759 100644 --- a/ClientApp/src/app/home/home.component.html +++ b/ClientApp/src/app/home/home.component.html @@ -1,14 +1,17 @@ -

Hello, world!

-

Welcome to your new single-page application, built with:

- -

To help you get started, we've also set up:

- -

The ClientApp subdirectory is a standard Angular CLI application. If you open a command prompt in that directory, you can run any ng command (e.g., ng test), or use npm to install extra packages into it.

+

Add/Edit Instructor

+ + + + + + + + + + + + + + + +
First nameLast NameDELETE
{{ instructor.firstName }}{{ instructor.lastName }}
\ No newline at end of file diff --git a/ClientApp/src/app/home/home.component.ts b/ClientApp/src/app/home/home.component.ts index 2747b30..c18a930 100644 --- a/ClientApp/src/app/home/home.component.ts +++ b/ClientApp/src/app/home/home.component.ts @@ -1,8 +1,22 @@ -import { Component } from '@angular/core'; +import { Component, Inject } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; @Component({ selector: 'app-home', templateUrl: './home.component.html', }) export class HomeComponent { + public instructors: any[] = [{id: "1", firstName: "Test", lastName: "Testov"}]; + + constructor(http: HttpClient, @Inject('BASE_URL') baseUrl: string) { + /*http.get(baseUrl + 'api/v1/instructors').subscribe(result => { + this.instructors = result; + }, error => console.error(error));*/ + } } + +interface Instructor { + id: string, + firstName: string, + lastName: string +} \ No newline at end of file