EXCEPTION: Uncaught (in promise): Error: Cannot match any routes: 'https%3A/login.stg.isports.com/Dreaminglogin/logoff.jsp%3Freferrer%3Dhttps%253A%252F%252Fjumping-auth.login.dancing.isports.com/logout.do%3Fredirect%3Dhttp%253A%252F%252Fqa.jumping.swimming.isports.com%26client_id%3Doooooooooooooooooooooooooooooo'
https://codepen.io/arar/pen/qVvwaL
logOut(): void {
let that = this;
$(".kendoContent").text('Are you sure you want to exit the application?');
let newdialog = $("#logOutDialog").data("kendoWindow").center().open();
$("#logoutYes").unbind().click(function () {
let userId;
let attributes = that.sportsservice.getSeesionStorageValue();
if (attributes) {
userId = attributes.user_attributes.Dreaming[0];
}
//console.log(userId);
let dateTime = that.sportsservice.todayDateWithTime();
let saveUserTrackData = { "userId": userId, "screenId": 0, "actionId": 2, "comment": "Logout" };//,"currentTimeStamp" : dateTime};
//that.progress.requestStart();
//users/network/lastaccessed?timeStamp=6/02/2017 05:54:22 PM
that.lastAccessCall(that);
that.sportsservice.getResponse('users/network/saveusertrack', 'post', saveUserTrackData)
.subscribe(
data => {
// that.progress.requestEnd();
},
err => { //that.progress.requestEnd();
}
);
let data = that.recentPinnedHistory.getRecentData('recentContract');
if (data) {
let postData = {
"recentHeros": data.recentData.recentHeros,
"pinnedHeros": data.recentData.pinnedHeros,
"pinnedContracts": data.recentData.pinnedContracts
};
that.sportsservice.getResponse("Heros/network/SPORTSRecentHeros", 'post', postData)
.subscribe(data => {
},
err => {
console.log("updating recent data failed");
}
);
}
that.sportsservice.clearSession();
window.localStorage.removeItem("season");
window.localStorage.removeItem("recentSPORTSHero");
window.localStorage.removeItem("recentContract");
window.sessionStorage.removeItem("userPrivilege");
window.sessionStorage.removeItem("loginResponse");
let baseUrl = window.location.hostname;
// let that = this;
if (window.location.hostname == "localhost") {
// let that = this;
alert("I am here");
baseUrl = 'qa.jumping.swimming.isports.com';
//that.router.navigate('https://login.stg.isports.com/Dreaminglogin/logoff.jsp?referrer=https%3A%2F%2Fjumping-auth.login.dancing.isports.com/logout.do?redirect=http%3A%2F%2F' #= baseUrl # '&client_id=oooooooooooooooooooooooooooooo');
that.router.navigate(['https://login.stg.isports.com/Dreaminglogin/logoff.jsp?referrer=https%3A%2F%2Fjumping-auth.login.dancing.isports.com/logout.do?redirect=http%3A%2F%2F' + baseUrl + '&client_id=oooooooooooooooooooooooooooooo']);
//window.location.href = 'https://login.stg.isports.com/Dreaminglogin/logoff.jsp?referrer=https%3A%2F%2Fjumping-auth.login.dancing.isports.com/logout.do?redirect=http%3A%2F%2F'+baseUrl+'&client_id=oooooooooooooooooooooooooooooo';
} else {
var envCheck;
envCheck = window.location.hostname.split(".");
if (envCheck[2].toLowerCase() == "swimming") {
window.location.href = 'https://login.stg.isports.com/Dreaminglogin/logoff.jsp?referrer=https%3A%2F%2Fjumping-auth.login.dancing.isports.com/logout.do?redirect=http%3A%2F%2F' + baseUrl + '&client_id=oooooooooooooooooooooooooooooo';
}
else if (envCheck[2].toLowerCase() == "stars") {
window.location.href = 'https://login.isports.com/Dreaminglogin/logoff.jsp?referrer=https%3A%2F%2Fauth-domain.login.sysstars.isports.com/logout.do?redirect=http%3A%2F%2F' + baseUrl + '&client_id=8dfcf377-83b7-4d5d-b403-aa65b78229f2';
}
else if (envCheck[2].toLowerCase() == "bat") {
//TEmporary URL
window.location.href = 'https://login.stg.isports.com/Dreaminglogin/logoff.jsp?referrer=https%3A%2F%2Fjumping-auth.login.dancing.isports.com/logout.do?redirect=http%3A%2F%2F' + baseUrl + '&client_id=oooooooooooooooooooooooooooooo';
}
if (window.location.hostname == "new.jumping.isports.com") {
window.location.href = 'https://login.isports.com/Dreaminglogin/logoff.jsp?referrer=https%3A%2F%2Fauth-domain.login.sysstars.isports.com/logout.do?redirect=http%3A%2F%2F' + baseUrl + '&client_id=8dfcf377-83b7-4d5d-b403-aa65b78229f2';
}
}
//that.router.navigate(['/Base']);
//location.reload();
});
$("#logoutNo").unbind().click(function () {
newdialog.close();
});
}