Use AngularJS with vimeo Player -


I am trying to display a vimeo player with json file with AngularJS When I run my app, I have received this message in the console:

  Error: [$ interpolate: interr] can not interpolate: {{video}} Error: [$ sce: insecurl ] URL resource blocked by url is not allowed by $ sceDelegate policy URL: http://player.vimeo.com/video/xxxxx http://errors.angularjs.org/1.2.16/$sce/insecurl?p0=http % 3A% 2F% 2Fplayer.vimeo.com% 2Fvideo% 2Fxxxxx http://errors.angularjs.org/1.2.16/$interpolate/interr?p0=%7B%7Bvideos%7D%7รข%Ninsecurl%3Fp0%3Dhttp% 253A% 252F% 252Fplayer.vimeo.com% 252Fvideo% 252xxxx at http: // localhost: 8000 / bower_components / angular / angular.js: 78: 12 at $ interpolate.fn (http: // localhost: 8000 / bower_components / angular / a ngular.js: 8637: 26) at attrInterpolatePreLinkFn (Http: // localhost: 8000 / bower_components / angular / angular.js: 6893: 30) at nodeLinkFn (http: // localhost: 8000 / bower_components / angular / angular.js: 6559: 13) on Composite LinkFn (http: //localhost:8000/bower_components/angular/angular.js5986) at publicLinkFn (compositeLinkFn (http: // localhost: 8000 / bower_components / angular / angular.js: 5989: 13)) FM (http: // localhost: 8000 / bower_components / angular / angular.js: 6005: 21) included boundband on controllers (http: // localhost: 8000 /bower_components/angular/angular.js:5891:30) (http: // localhost: 8000 / bower_components / angular / angular.js: 6600: 18) at ngRepeatAction (http: // localhost: 8000 / bower_components / angular / angular.js: 20084: 15)   

my wish ML:

  & lt; div class = "videoWrapper" ng-repeat = "track by video $ index" in project.pr_video & gt; & Lt; iframe ng-src = "{{video}} width =" 560 "height =" 349 "frameborder =" 0 "webkitolopholoscreen mozillaofflosscreen acceptable screen & gt; & Lt; / Iframe & gt; & Lt; / Div & gt;   

I do not have to tell Angelor that Vimeo is a trusted host. Can anyone explain it to me?

thx

You can use the URL to rely on. . var myApp = angular.module ('myApp', ['NGSNitize']); myApp.controller ('myController', ['$ scope', '$ sce', function ($ radius, $ sce) {$ scope.videos = $ sce.getTrustedResourceUrl ('http://player.vimeo.com/video / Xxxxx ');}]);

You can optionally configure the white list of URLs.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -