Disable back button on specific page help?

Hi all,

Once a user hits login I have this piece of code within the ‘success:’ part:

$ionicHistory.nextViewOptions({
disableBack: true
});
$state.go(‘feed’);

It’s not working, not sure why? Can anyone clarify a fix/workaround?

1 Like

Ok so i noticed I need to inject ionicHistory but have no idea how to as my controllers are currently in app.js - how can I inject into an anonymous function?

Nevermind guys its fixed - i was an idiot and forgot to inject it… derp… figured it out now, thanks.