Skip to content

Commit

Permalink
add error page if bio doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Vijeinath committed Dec 10, 2023
1 parent 48babc4 commit 0795b31
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/app/app.routing.ts
Expand Up @@ -33,8 +33,7 @@ const appRoutes: Routes = [
},
{
path: 'biography/:person',
component: BiographyComponent,
pathMatch: 'full'
component: BiographyComponent
},
{
path: 'introduction/:project/:id',
Expand Down
8 changes: 8 additions & 0 deletions src/app/biography/biography.component.html
Expand Up @@ -287,6 +287,14 @@ <h2>Biography</h2>
</section>
</ng-container>

<!-- in case the name does not exist -->
<ng-container *ngSwitchDefault>
<h1>Oops!</h1>
<p>
<strong>The biography you are looking for does not exist!</strong>
</p>
</ng-container>

</div>
</div>

Expand Down

0 comments on commit 0795b31

Please sign in to comment.