mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
docs(modal): update Angular usage code (#17978)
closes ionic-team/ionic-docs#620
This commit is contained in:
committed by
Brandy Carney
parent
77c980b032
commit
b081ca4dd0
@ -8,9 +8,9 @@ A Modal is a dialog that appears on top of the app's content, and must be dismis
|
|||||||
Modals can be created using a [Modal Controller](../modal-controller). They can be customized by passing modal options in the modal controller's create method.
|
Modals can be created using a [Modal Controller](../modal-controller). They can be customized by passing modal options in the modal controller's create method.
|
||||||
|
|
||||||
|
|
||||||
### Passing paramaters
|
### Passing parameters
|
||||||
|
|
||||||
When a modal is created, paramaters might be passed to the newly created modal:
|
When a modal is created, parameters might be passed to the newly created modal:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
// Create a modal using MyModalComponent with some initial data
|
// Create a modal using MyModalComponent with some initial data
|
||||||
@ -83,7 +83,7 @@ export class ModalExample {
|
|||||||
```
|
```
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { Component } from '@angular/core';
|
import { Component, Input } from '@angular/core';
|
||||||
import { NavParams } from '@ionic/angular';
|
import { NavParams } from '@ionic/angular';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|||||||
@ -21,7 +21,7 @@ export class ModalExample {
|
|||||||
```
|
```
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { Component } from '@angular/core';
|
import { Component, Input } from '@angular/core';
|
||||||
import { NavParams } from '@ionic/angular';
|
import { NavParams } from '@ionic/angular';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|||||||
Reference in New Issue
Block a user