@fOrtiz wrote:
Hello!
I am building my second application on Ionic, the first in v3. Something that is bugging me is that I am not sure how to use a single Modal class to every need in the app. Or if that is even possible. Does Ionic require us to define a Modal class for every different html resource?
Today I have something like this:
@Component({ templateUrl: 'my_modal.html' }) export class MyModal { private title: any; private message: any; constructor(params: NavParams, public renderer: Renderer, public viewCtrl: ViewController) { // this.renderer.setElementClass(viewCtrl.pageRef().nativeElement, 'my-popup', true); // this.form = FormData; this.title = params.data.title; this.message = params.data.message; } dismiss() { this.viewCtrl.dismiss(); } }Thanks for your help.
Ortiz
Posts: 1
Participants: 1