Why am I not able to load youtube embed url in django template?

Viewed 45

Currently I have been working on Django templates with Angular-js & I am binding data into Django templates. I am facing difficulty when binding YouTube video URL using Angular js.

My code as below.

<div class="col-12 col-lg-6 col-xl-5 pb-3 pb-lg-0"><iframe class="agent-video-iframe border-0" height="326px" ng-src="{{agent.video_url }}" width="100%"></iframe></div>
<!--            <div class="col-12 col-lg-6 col-xl-5 pb-3 pb-lg-0"><iframe class="agent-video-iframe border-0" height="326px" src="https://www.youtube.com/embed/KYPRQStfRWo" width="100%"></iframe></div>-->

When I am loading page with static youtube url , I am able to successfully load youtube video url. When I am loading page with dynamic youtube url(binding using AngularJs), I am not able to load youtube video url.

I am not also getting any error message.

Please let me know if anyone has idea or solution.

Thanks.

0 Answers
Related