Search code examples
angularionic3popover

ionic 3 angular passing multiple sets of data to popover


I have a ionic 3 angular app. And i am using popover to show some data.

I invoke it using:

 popover = this.editOptyPopup.create(EditOptyPage, rw, { cssClass: 'edit-opty-popover'});

here rw is one JSON structure. I got another logical json object and i want to pass that too. What would be the recommended way here?

One way I think is creating a wrapper json containing both the objects. however, sort of feels ugly to me.


Solution

  • You can pass an array containing as many json structures as you want. It`d look something like this:

    popover = this.editOptyPopup.create(EditOptyPage, [rw, json2, json3, json4], { cssClass: 'edit-opty-popover'});