I am working with angular js . I have a controller \"youTubePlayerCtrl\", in this controller i have $scope.videoID which contains the youtube video id. I am able to get this
First: you need to use ng-src
instead of src
as @Cherniv suggested in a comment to your question. Read more here.
Second: you cannot concatenate the URL inside the source attribute for security reasons: you must concatenate the URL in Javascript in a scope variable e.g. fullURL
and then ng-src="{{fullURL}}"
. Read more here.
Third: if Strict Contextual Escaping (SCE) is enabled ‒ and Angular v1.2 ships with SCE enabled by default ‒ you need to whitelist the URLs. Read more here and here.