In this article we will learn about some of the frequently asked TypeScript programming questions in technical like “ionic modal pass data” Code Answer’s. When creating scripts and web applications, error handling is an important part. If your code lacks error checking code, your program may look very unprofessional and you may be open to security risks. Error or stack handling on typescript was simple and easy. An error message with filename, line number and a message describing the error is sent to the browser. This tutorial contains some of the most common error checking methods in Typescript. Below are some solution about “ionic modal pass data” Code Answer’s.
ionic modal pass data
xxxxxxxxxx
1
2
async presentModal() {
3
const modal = await this.modalController.create({
4
component: ModalPage,
5
componentProps: {
6
foo: 'hello',
7
bar: 'world'
8
}
9
});
10
return await modal.present();
11
}
12
13
@Component()
14
export class ModalPage implements OnInit {
15
foo;
16
bar;
17
18
ngOnInit() {
19
console.log(`${foo} ${bar}`)
20
}
21
}
ionic modal controller pass parameter
xxxxxxxxxx
1
let profileModal = await this.modalCtrl.create({
2
component: SearchModal,
3
componentProps: {
4
specs: [this.specialization_selected]
5
}
6
});