I create AuthHttpProvider which is Http wrapper which allow to send GET/POST/PUT/DELETE request and automagically add authentication token (jwt) to each request. And I use this wrapper instead Http in all my ionic2 app. Now i want to logout user (and go to loginPage) when I detect that any response from server has 403 Http error code.
So when I try to inject NavController (to use it to loginPage after 403 detection) in constructor by
constructor (public navCtrl: NavController)
I get:
Uncaught (in promise): Error: No provider for NavController
How to get access to navCtrl inside Provider?