I have an ionic2 tabs based application. On one tab I have a form. I want the app to block when I switch to another tab, and the form isn't valid.
In ng2 I could use a routeGuard for these sorts of scenarios, but is there a solution for this scenario in ionic2?
From other posts I understand that ionic2 doesn't work with routing, the way Angular 2 does.
Can anyone give me a hint?
You can consider to use
ngOnInit()Method. For ex- Here you dont load dashboard if user does not have auth key. you redirect user back to other component i.e /login in this case.