Skip to content

Commit a599fe0

Browse files
committed
refactor(angular): improving code example
1 parent fb6d127 commit a599fe0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/angular/injection-tokens.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ When opening a modal that uses the injection token, you can pass the component d
150150
```tsx
151151
import { Component, inject } from '@angular/core';
152152
import { IonContent, IonButton, ModalController } from '@ionic/angular/standalone';
153-
import { ModalContentComponent } from './modal-content.component';
153+
import { ModalComponent } from './modal.component';
154154

155155
@Component({
156156
selector: 'app-home',
@@ -164,14 +164,14 @@ export class HomePage {
164164
private modalController = inject(ModalController);
165165

166166
async openModal() {
167-
const modal = await this.modalController.create({
168-
component: ModalContentComponent,
167+
const myModal = await this.modalController.create({
168+
component: ModalComponent,
169169
componentProps: {
170170
// Any props you want to pass to the modal content
171171
},
172172
});
173173

174-
await modal.present();
174+
await myModal.present();
175175
}
176176
}
177177
```

0 commit comments

Comments
 (0)