Thank you for your support!
Save data, conditionally load youtube videos.
Check out http://angular-adaptive.github.io/adaptive-youtube/demo/
- AngularJS v ~1.2.x
We use bower for dependency management. Add
dependencies: {
"angular-adaptive-youtube": "latest"
}
To your bower.json
file. Then run
bower install
This will copy the youtube module files into your bower_components
folder, along with its dependencies. Load the script files in your application:
<script type="text/javascript" src="bower_components/angular/angular.js"></script>
<script type="text/javascript" src="bower_components/angular-adaptive-youtube/angular-adaptive-youtube.min.js"></script>
Add the adaptive.youtube module as a dependency to your application module:
var myAppModule = angular.module('MyApp', ['adaptive.youtube']);
Set up styles and a video id
.youtube { width: 100%; height: 500px; }
$scope.youtubeId = 'kxopViU98Xo';
And use it
<youtube video="youtubeId" class="youtube"></youtube>
Pull requests are welcome.
Make a PR against canary branch and don't bump any versions.
Please respect the code style in place.
The MIT License
Copyright (c) 2014 Jan Antala