0

In my angular application, I have an url which I need to open in new window. If I directly give url in iframe src, it works. But if the url is stored in an variable and if I assign src through variable, it fails.

For example: var win = $window.open(); win.document.write('')

This works.

But if I have a variable url = "//www.youtube.com/embed/mTWfqi3-3qU". var win = $window.open(); win.document.write('')

This fails.

If a url is assigned to a variable, how to assign that url to iframe src?

Pramod
  • 41
  • 1
  • 7

0 Answers0