Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
angular-training
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Deep Bhuller
angular-training
Commits
24c27ff5
Commit
24c27ff5
authored
Apr 21, 2021
by
dbhuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added routes for home and not found error
parent
b0a53606
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
111 additions
and
2 deletions
+111
-2
app-routing.module.ts
...ndson/nisum-angular-handson/src/app/app-routing.module.ts
+5
-1
app.module.ts
...gular_handson/nisum-angular-handson/src/app/app.module.ts
+5
-1
header.component.html
...isum-angular-handson/src/app/header/header.component.html
+1
-0
home.component.css
...son/nisum-angular-handson/src/app/home/home.component.css
+0
-0
home.component.html
...on/nisum-angular-handson/src/app/home/home.component.html
+1
-0
home.component.spec.ts
...nisum-angular-handson/src/app/home/home.component.spec.ts
+25
-0
home.component.ts
...dson/nisum-angular-handson/src/app/home/home.component.ts
+15
-0
notfound.component.css
...m-angular-handson/src/app/notfound/notfound.component.css
+16
-0
notfound.component.html
...-angular-handson/src/app/notfound/notfound.component.html
+3
-0
notfound.component.spec.ts
...gular-handson/src/app/notfound/notfound.component.spec.ts
+25
-0
notfound.component.ts
...um-angular-handson/src/app/notfound/notfound.component.ts
+15
-0
No files found.
nisum_angular_handson/nisum-angular-handson/src/app/app-routing.module.ts
View file @
24c27ff5
...
...
@@ -6,15 +6,19 @@ import { GreeceComponent } from './greece/greece.component';
import
{
SpainComponent
}
from
'./spain/spain.component'
;
import
{
AccountComponent
}
from
'./account/account.component'
;
import
{
ContactComponent
}
from
'./contact/contact.component'
;
import
{
HomeComponent
}
from
'./home/home.component'
;
import
{
NotfoundComponent
}
from
'./notfound/notfound.component'
;
const
routes
:
Routes
=
[
{
path
:
'home'
,
component
:
HomeComponent
},
{
path
:
'england'
,
component
:
EnglandComponent
},
{
path
:
'france'
,
component
:
FranceComponent
},
{
path
:
'account'
,
component
:
AccountComponent
},
{
path
:
'greece'
,
component
:
GreeceComponent
},
{
path
:
'spain'
,
component
:
SpainComponent
},
{
path
:
'contact'
,
component
:
ContactComponent
}
{
path
:
'contact'
,
component
:
ContactComponent
},
{
path
:
'**'
,
component
:
NotfoundComponent
}
];
@
NgModule
({
...
...
nisum_angular_handson/nisum-angular-handson/src/app/app.module.ts
View file @
24c27ff5
...
...
@@ -15,6 +15,8 @@ import { SpainComponent } from './spain/spain.component';
import
{
GreeceComponent
}
from
'./greece/greece.component'
;
import
{
AccountComponent
}
from
'./account/account.component'
;
import
{
ContactComponent
}
from
'./contact/contact.component'
;
import
{
HomeComponent
}
from
'./home/home.component'
;
import
{
NotfoundComponent
}
from
'./notfound/notfound.component'
;
@
NgModule
({
declarations
:
[
...
...
@@ -26,7 +28,9 @@ import { ContactComponent } from './contact/contact.component';
SpainComponent
,
GreeceComponent
,
AccountComponent
,
ContactComponent
ContactComponent
,
HomeComponent
,
NotfoundComponent
],
imports
:
[
BrowserModule
,
...
...
nisum_angular_handson/nisum-angular-handson/src/app/header/header.component.html
View file @
24c27ff5
<div
class=
"header"
>
<div
class=
"btnMenu"
>
<button
[
routerLink
]="['/
home
']"
>
Home
</button>
<button
[
routerLink
]="['/
england
']"
>
England
</button>
<button
[
routerLink
]="['/
france
']"
>
France
</button>
<button
[
routerLink
]="['/
spain
']"
>
Spain
</button>
...
...
nisum_angular_handson/nisum-angular-handson/src/app/home/home.component.css
0 → 100644
View file @
24c27ff5
nisum_angular_handson/nisum-angular-handson/src/app/home/home.component.html
0 → 100644
View file @
24c27ff5
<p>
home works!
</p>
nisum_angular_handson/nisum-angular-handson/src/app/home/home.component.spec.ts
0 → 100644
View file @
24c27ff5
import
{
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
HomeComponent
}
from
'./home.component'
;
describe
(
'HomeComponent'
,
()
=>
{
let
component
:
HomeComponent
;
let
fixture
:
ComponentFixture
<
HomeComponent
>
;
beforeEach
(
async
()
=>
{
await
TestBed
.
configureTestingModule
({
declarations
:
[
HomeComponent
]
})
.
compileComponents
();
});
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
HomeComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
nisum_angular_handson/nisum-angular-handson/src/app/home/home.component.ts
0 → 100644
View file @
24c27ff5
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-home'
,
templateUrl
:
'./home.component.html'
,
styleUrls
:
[
'./home.component.css'
]
})
export
class
HomeComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
():
void
{
}
}
nisum_angular_handson/nisum-angular-handson/src/app/notfound/notfound.component.css
0 → 100644
View file @
24c27ff5
.fof
{
display
:
table-cell
;
vertical-align
:
middle
;
}
.fof
h1
{
font-size
:
50px
;
display
:
inline-block
;
padding-right
:
12px
;
animation
:
type
.5s
alternate
infinite
;
}
@keyframes
type
{
from
{
box-shadow
:
inset
-3px
0px
0px
#888
;}
to
{
box-shadow
:
inset
-3px
0px
0px
transparent
;}
}
\ No newline at end of file
nisum_angular_handson/nisum-angular-handson/src/app/notfound/notfound.component.html
0 → 100644
View file @
24c27ff5
<div
class=
"fof"
>
<h1>
Error 404 - Not Found
</h1>
</div>
\ No newline at end of file
nisum_angular_handson/nisum-angular-handson/src/app/notfound/notfound.component.spec.ts
0 → 100644
View file @
24c27ff5
import
{
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
NotfoundComponent
}
from
'./notfound.component'
;
describe
(
'NotfoundComponent'
,
()
=>
{
let
component
:
NotfoundComponent
;
let
fixture
:
ComponentFixture
<
NotfoundComponent
>
;
beforeEach
(
async
()
=>
{
await
TestBed
.
configureTestingModule
({
declarations
:
[
NotfoundComponent
]
})
.
compileComponents
();
});
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
NotfoundComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
nisum_angular_handson/nisum-angular-handson/src/app/notfound/notfound.component.ts
0 → 100644
View file @
24c27ff5
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-notfound'
,
templateUrl
:
'./notfound.component.html'
,
styleUrls
:
[
'./notfound.component.css'
]
})
export
class
NotfoundComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
():
void
{
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment