Skip to content

Commit ef3febd

Browse files
committed
feat: Add toast notifications and 404 routing
- Integrate ngx-sonner for toast notifications - Update routing to use NotFound component - Add toaster to root component
1 parent b468428 commit ef3febd

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/app/app.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<ngx-sonner-toaster position="top-right" [duration]="3000" />
12
<div class="page-container">
23
<app-header />
34
<div class="content-wrapper">

src/app/app.routes.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ import { Home } from './pages/home/home';
33
import { About } from './pages/about/about';
44
import { Services } from './pages/services/services';
55
import { Contact } from './pages/contact/contact';
6+
import { NotFoundComponent } from './pages/not-found/not-found';
67

78
export const routes: Routes = [
89
{ path: '', component: Home },
910
{ path: 'about', component: About },
1011
{ path: 'services', component: Services },
1112
{ path: 'contact', component: Contact },
12-
{ path: '**', redirectTo: '' },
13+
{ path: '**', component: NotFoundComponent },
1314
];

src/app/app.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import { Component } from '@angular/core';
22
import { RouterOutlet } from '@angular/router';
3+
import { NgxSonnerToaster } from 'ngx-sonner';
34
import { Header } from './components/header/header';
45
import { Footer } from './components/footer/footer';
56

67
@Component({
78
selector: 'app-root',
8-
imports: [RouterOutlet, Header, Footer],
9+
imports: [RouterOutlet, Header, Footer, NgxSonnerToaster],
910
templateUrl: './app.html',
10-
styleUrl: './app.css'
11+
styleUrl: './app.css',
1112
})
12-
export class App {
13-
14-
}
13+
export class App {}

0 commit comments

Comments
 (0)