I am working on Angular website , where
I am opening an another website through iframe ,
how can I read the url of the website opeaning in iframe ..?
I am putting my code
.html file
<iframe src="https://www.zaubacorp.com/">
<p>Your browser does not support iframes.</p>
</iframe>
when I searched how can I read the url to website opening in iframe in Angular .
I got following suggestion in javascript How do I get the current location of an iframe?
alert(document.getElementById("myiframe").src);
document.getElementById("myiframe").src = 'http://www.google.com/';
alert(document.getElementById("myiframe").documentWindow.location.href);
Error: Permission denied to get property Location.href
but actually it is not working in Angular