AngularJS - 在使用指令嵌入Youtube视频网址时出现问题 [英] AngularJS - issue when embedding the Youtube video url with directive
问题描述
我正在尝试将来自 Json的url链接嵌入到angularJs 。
现在我有了 {{video .youtubeid}} 与Json控制器中的输出有 _kux-YQujjM
但是当我用来调用这个函数时< iframe>,它无效。
当我在P标签内使用此功能时,它将输出显示为 _kux-YQujjM
这是我用iframe标签的代码。
< iframe width =100 %height =250src =// www.youtube.com/embed/{{video.youtubeid}}frameborder =0allowfullscreen =>< / iframe>
我是否错过了我的代码中的任何内容,或者是否有任何方法可以使用此链接连接网址。
I am trying to Embed the url link from a Json to angularJs.
Now i have the {{video.youtubeid}} with the output in Json controller has _kux-YQujjM
But when i use to call this function inside <iframe>, it is not working.
when i use this function inside P tag it show the output as _kux-YQujjM
This is my code used with iframe tag.
<iframe width="100%" height="250" src="//www.youtube.com/embed/{{video.youtubeid}}" frameborder="0" allowfullscreen=""></iframe>
Whether i missed anything in my code or Is there any way to get the url to connect with this link.
推荐答案
这篇关于AngularJS - 在使用指令嵌入Youtube视频网址时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!