I'm having trouble redirecting my app outside of Angular to the logout page.
I'm doing it by using $window.location.href
but it's not working on FireFox.
So, There was a suggestion to use $window.location
directly but since i'm writing in Typescript i need to create a new Location object rather then just assign my string to it...
I looked into lib.d.ts and i saw that location is declared as:
declare var Location: {
prototype: Location;
new(): Location;
}
so i adjust my code to:
var url: string = "http:\\\\host:port/blabla/logout";
var loc: Location = new Location();
loc.href = url;
this.$window.location = loc;
but got this error:
Error: Illegal constructor.
Any Idea how to create the Location object? Is it a good practice to do so? Any other insights maybe?
Thanks