4

I want to open Play Store on ngOnInit. I have tried every combination but host name is added automatically.

myComponent.ts

var url1 = 'market.android.com/details?id=com.test&referrer=' + sponser;
window.open(url1, '_blank') //try1
  $.get(url1, function () { /!*callback*!/
  }); //try2

const link = document.createElement('a');
link.target = '_top';
link.href = url;
link.setAttribute('visibility', 'hidden');
link.click();//try3

But none of them are working. Thanks in advance.

Akshay
  • 365
  • 1
  • 3
  • 20

0 Answers0