Client-side navigation. For example, click Counter then Back to return here.
-
Angular CLI integration. In development mode, there's no need to run ng serve. It runs in the background automatically, so your client-side resources are dynamically built on demand and the page refreshes when you modify any file.
-
Efficient production builds. In production mode, development-time features are disabled, and your dotnet publish configuration automatically invokes ng build to produce minified, ahead-of-time compiled JavaScript files.
-
-
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 name
+
Last Name
+
DELETE
+
+
+
+
+
{{ 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