File tree 5 files changed +16
-8
lines changed
5 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 1
1
< app-header [title] ="title "> </ app-header >
2
2
3
3
< div class ="container ">
4
- < app-users [users] =" users " > </ app-users >
4
+ < router-outlet > </ router-outlet >
5
5
</ div >
Original file line number Diff line number Diff line change 1
1
import { Component } from '@angular/core' ;
2
- import { USERS } from './mock-users' ;
2
+
3
3
@Component ( {
4
4
selector : 'app-root' ,
5
5
templateUrl : './app.component.html' ,
6
6
styleUrls : [ './app.component.css' ]
7
7
} )
8
8
export class AppComponent {
9
9
title : string = 'CONTACT MANAGER' ;
10
- users = USERS ;
11
10
}
Original file line number Diff line number Diff line change 1
1
import { BrowserModule } from '@angular/platform-browser' ;
2
2
import { NgModule } from '@angular/core' ;
3
+ import { HttpClientModule } from '@angular/common/http' ;
3
4
5
+ import { UsersService } from './services/users.service' ;
4
6
5
7
import { AppComponent } from './app.component' ;
6
8
import { HeaderComponent } from './components/header/header.component' ;
7
9
import { UsersComponent } from './components/users/users.component' ;
8
10
import { UserCardComponent } from './components/user-card/user-card.component' ;
11
+ import { AppRoutingModule } from './/app-routing.module' ;
12
+ import { AboutComponent } from './components/pages/about/about.component' ;
9
13
10
14
11
15
@NgModule ( {
12
16
declarations : [
13
17
AppComponent ,
14
18
HeaderComponent ,
15
19
UsersComponent ,
16
- UserCardComponent
20
+ UserCardComponent ,
21
+ AboutComponent
17
22
] ,
18
23
imports : [
19
- BrowserModule
24
+ BrowserModule ,
25
+ HttpClientModule ,
26
+ AppRoutingModule
20
27
] ,
21
- providers : [ ] ,
28
+ providers : [ UsersService ] ,
22
29
bootstrap : [ AppComponent ]
23
30
} )
24
31
export class AppModule { }
Original file line number Diff line number Diff line change 1
- export const USERS = [
1
+ import { User } from './models/user' ;
2
+
3
+ export const USERS : User [ ] = [
2
4
{
3
5
"guid" : "60e58cc8-8a43-4d07-bba1-5a4c0e32a8ee" ,
4
6
"isActive" : true ,
Original file line number Diff line number Diff line change 3
3
4
4
< head >
5
5
< meta charset ="utf-8 ">
6
- < title > Blog </ title >
6
+ < title > Contact Application </ title >
7
7
< base href ="/ ">
8
8
9
9
< meta name ="viewport " content ="width=device-width, initial-scale=1 ">
You can’t perform that action at this time.
0 commit comments