How to redirect to home page if I click back button after login in angular JS?
<pre><code>.run(['$rootScope', '$location', 'Auth','$state', function ($rootScope, $location, Auth,$state) {

    $rootScope.$on('$routeChangeStart', function (event) {          

        if (!Auth.isLoggedIn()) {
            console.log('DENY');
            event.preventDefault();
            $state.go('login');
        }
        else {
            console.log('ALLOW');
            $state.go('dashboard.admin');
        }
    });
}])
</code></pre>