AngularJs随着I帧 [英] AngularJs With i frame
本文介绍了AngularJs随着I帧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何机构可以告诉我为什么此的jsfiddle 是不工作?我没能获得 VIDEOID
的价值。如果我从模块中删除 ngRoute
则是工作的罚款。
Can any body tell me why this jsfiddle is not working? I am not able to get value of videoId
. If I remove ngRoute
from module then it is working fine.
推荐答案
您需要使用 NG-SRC
是这样的:
<div ng-controller="AppController">
<h1>{{videoID}}</h1>
<iframe class="youtube-player" type="text/html" width="auto"
height="auto" ng-src="{{videoID}}"
allowfullscreen="" frameborder="0"> </iframe>
</div>
和
var app = angular.module('my-app', []);
app.controller('AppController', function ($scope, $sce) {
$scope.videoID = $sce.trustAsResourceUrl('http://www.youtube.com/embed/C0DPdy98e4c');
});
请参阅本文档。
这篇关于AngularJs随着I帧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文