Siva
Siva

Reputation: 1

Clear the history when user logout form Application In AngularJS

I am very new to AngularJS, I am working on web based project using AngularJS.

When the user logs out of the application or when user clicks the browser back button application is going to previous page.

Can anyone show me how to restrict the back button after user logout?

I tried

$location.replace();

And I tried

Window.history.forward();

But I am not able to work it out. Can anyone please help me to achieve this?

Upvotes: 0

Views: 1184

Answers (1)

Pierre Gayvallet
Pierre Gayvallet

Reputation: 2953

Simply put: you can't control the browser history.

Upvotes: 1

Related Questions