i have been browsing the net but there isnt any useful information i can find on how to custom create custom 403 error page.
I understand and i know how to create error 404 page .
I am creating an example page for both error 404 and error 403 in the same project. For an example , i created a button and called it "home" to redirect user to home page .but if user click on home page it will return "Error 403 , Permission Denied " .
But i am unsure where i can code it . Below is the example for routing.module.ts that i have created in my project.
Do i have to code it directly below component : error404component to add my error403 component? or do i have to create a new router for error 403 page.
@NgModule({
imports: [
RouterModule.forRoot([
{
path: 'home',
component: HomeComponent
},
{
path: 'about',
component: AboutComponent
},
{
path: '**',
component: Error404Component
}
])
],
exports: [
RouterModule
]
})
Thanks in advance