Hi All,
I have a page with an ion-navbar
, when I navigate to the next page I use the following:
this.nav.push(SubCategoryPage, {
employeeModel: this.employeeModel
});
It passes the param parameter successfully to the next page.
When I am in the next page (SubCategoryPage
), I update the parameter object (employeeModel
). My question is, when I click the back arrow to return to the previous page, how do I pass the modified parameter object (employeeModel
) back?
When back is clicked, the ngOnDestroy
is called, do I use this, but then how do I pass the parameter object?
OR, is there some other scope I should put the object in? (How do you pass objects from one page to another, including back?) What’s best practice?
Thanks