I have been stuck in this for a long time. How can I replace window.location.href = url
to use Angular routing?
checkforStoredLocale() {
if (this.storedlocale && this.storedlocale !== this.localeId) {
this.consoleService.consoleMessage('redirecting');
let port = this.location.port.length > 0 ? `:${this.location.port}` : '';
let url = `${this.location.protocol}//${this.location.hostname}${port}${this.baseHref}${this.storedlocale}${this.location.pathname}`;
this.consoleService.consoleMessage(url);
// this.route.navigateByUrl(url);
window.location.href = url;
}
}