Skip to content
View lessons Login

Launch sale! Get 30% OFF expires in 126:46:22

3d cartoon hands holding a phone

Unlock full course by purchasing a membership

The Checklist Detail Page

The Checklist Detail Page

Now it’s time to create our next smart component/routed component/feature component — whatever you want to call it! This one will be responsible for displaying the details of a particular checklist.

import { Component } from '@angular/core';
import {
IonBackButton,
IonButtons,
IonContent,
IonHeader,
IonTitle,
IonToolbar,
} from '@ionic/angular/standalone';
@Component({
selector: 'app-checklist',
template: `
<ion-header>
<ion-toolbar>
<ion-buttons slot="start">
<ion-back-button defaultHref="/"></ion-back-button>
</ion-buttons>
</ion-toolbar>
</ion-header>
<ion-content> </ion-content>
`,
imports: [
IonContent,
IonHeader,
IonToolbar,
IonButtons,
IonBackButton,
IonTitle,
],
})
export default class ChecklistComponent {}

Since this is a routed component, we are also going to need to set up the routing:

import { Routes } from '@angular/router';
export const routes: Routes = [
{
path: 'home',
loadComponent: () => import('./home/home.component'),
},
{
path: 'checklist/:id',
loadComponent: () => import('./checklist/checklist.component'),
},
{
path: '',
redirectTo: 'home',
pathMatch: 'full',
},
];
STANDARD STANDARD

Thanks for checking out the preview of this lesson!

You do not have the appropriate membership to view the full lesson. If you would like full access to this module you can view membership options (or log in if you are already have an appropriate membership).