I have logout button in my angularjs(1.8) application. On click of it calling the login page url. After logout, when i click the browser back button again it is going to my application page instead of login page.
<input type="button" id="btnLogout" value="Logout" name="btnLogout" style="background-color:crimson;color:white;font-weight:bold" ng-click="interfaceControllerVm.Logout()" />
angular.module("main")
.controller("interfaceController", InterfaceController);
function InterfaceController($scope, $http) {
var interfaceControllerVm = this;
Initialize();
function Logout() {
interfaceControllerVm.loading = true;
var logouturl = "https://Loouturl.com/famlogout?";
var loginurl = "https://Loginurl.com";
window.location.replace(logoutUrl);
}
}
Please suggest me what’s wrong here
Thanks Sam