Skip to content

Instantly share code, notes, and snippets.

@bora89
Created January 25, 2017 15:56
Show Gist options
  • Save bora89/53def0e860319ec61d93028aa39ce0f6 to your computer and use it in GitHub Desktop.
Save bora89/53def0e860319ec61d93028aa39ce0f6 to your computer and use it in GitHub Desktop.
var app = angular.module('plunker', ['ngSanitize']);
app.controller('MainCtrl', function($scope, $sce) {
$scope.trustSrc = function(src) {
return $sce.trustAsResourceUrl(src);
}
$scope.movie = {src:"http://www.youtube.com/embed/Lx7ycjC8qjE", title:"Egghead.io AngularJS Binding"};
});
class="youtube-player" type="text/html" width="640" height="385" ng-src="{{trustSrc(movie.src)}}" allowfullscreen frameborder="0">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment