Reputation: 908
I'm using angular(7) universal and i need to redirect user to an external url which i get from a web api. the problem is there is no window object in angular universal (i need the search engine bots to be redirected - meaning it is most important in server side) any help would be appreciated
Upvotes: 0
Views: 538
Reputation: 908
as a more detailed answer after @MBDev answer here is how you can set the meta tag grammatically
constructor(private _meta: Meta){}
redirect(){
this._meta.addTag({ 'http-Equiv': 'refresh', content: '0; '+this.redirectUrl });
}
Upvotes: 1
Reputation: 442
Try the following html header:
<meta http-equiv="refresh" content="0; url=https://mywebsite.test/" />
Upvotes: 1