Skip to content

Commit d1d7552

Browse files
committed
404.
1 parent 188f636 commit d1d7552

File tree

6 files changed

+38
-5
lines changed

6 files changed

+38
-5
lines changed

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,8 @@ Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protrac
2626

2727
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
2828

29-
3029
404
31-
regionalization
3230
users page
31+
toast
3332
HttpErroHandling
3433
Error handling
35-
localhost:4200/users/gnllucena
36-
toast

src/app/app.module.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ export const appRoutes: Routes = [
2424
path: 'users',
2525
loadChildren: './modules/users/users.module#UsersModule'
2626
},
27-
{ path: '**', redirectTo: '' }
27+
{
28+
path: 'not-found',
29+
loadChildren: './modules/not-found/not-found.module#NotFoundModule'
30+
},
31+
{ path: '**', redirectTo: 'not-found' }
2832
];
2933

3034
@NgModule({
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
These are not the droids you are looking for...
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Component, ViewEncapsulation } from '@angular/core';
2+
3+
@Component({
4+
selector: 'not-found-page',
5+
templateUrl: './not-found-page.component.html',
6+
encapsulation: ViewEncapsulation.None
7+
})
8+
9+
export class NotFoundPageComponent {
10+
title = 'Not found';
11+
12+
constructor() { }
13+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { NgModule } from '@angular/core';
2+
import { RouterModule, Routes } from '@angular/router';
3+
4+
import { NotFoundPageComponent } from './not-found-page/not-found-page.component';
5+
6+
const appRoutes: Routes = [
7+
{ path: '', component: NotFoundPageComponent },
8+
];
9+
10+
@NgModule({
11+
declarations: [
12+
NotFoundPageComponent,
13+
],
14+
imports: [
15+
RouterModule.forChild(appRoutes)
16+
]
17+
})
18+
export class NotFoundModule { }

src/app/services/users.service.ts

Whitespace-only changes.

0 commit comments

Comments
 (0)