HTML5 Video is not working with AngularJS ng-src tag

后端 未结 10 1152
北恋
北恋 2020-11-29 02:25

AngularJS ng-src doesn\'t work with HTML5 Video element in this fiddle: http://jsfiddle.net/FsHah/5/

Looking at video element, the src tag is being popu

10条回答
  •  自闭症患者
    2020-11-29 02:38

    I think what's happening is Angular fills in the src attributes after the and elements have been added to the page, so the browser sees the elements with broken URLs. I worked around it using ng-if:

            
    

    This makes the element tied to the existence of foo, which is a scope variable being populated via AJAX call.

提交回复
热议问题