Last active
July 5, 2016 20:18
-
-
Save johhansantana/9f64d13880e6c62bc08b9d2ae0c55e1a to your computer and use it in GitHub Desktop.
trust ng-src video urls $sce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.filter('trusted', function ($sce) { | |
return function (url) { | |
return $sce.trustAsResourceUrl(url); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<video controls> | |
<source ng-src="{{object.videoUrl | trusted}}" type="video/mp4"> Your browser does not support the video tag. | |
</video> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment