angular-adaptive / adaptive-youtube

Save data, conditionally load youtube videos.

Home Page:http://angular-adaptive.github.io/adaptive-youtube/demo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This repository is deprecated!

Thank you for your support!


angular-adaptive-youtube v0.1.0 Build Status

Save data, conditionally load youtube videos.

Demo

Check out http://angular-adaptive.github.io/adaptive-youtube/demo/

Requirements

  • AngularJS v ~1.2.x

Usage

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>

Contributing

Pull requests are welcome.

Make a PR against canary branch and don't bump any versions.

Please respect the code style in place.

License

The MIT License

Copyright (c) 2014 Jan Antala

About

Save data, conditionally load youtube videos.

http://angular-adaptive.github.io/adaptive-youtube/demo/

License:MIT License


Languages

Language:JavaScript 100.0%