Here'ss the bower command to install the component on your side.
bower install ng-youtube-embed.
Once you installed the components successfully, you need to reference the same on index page as in the following snippet:
- <script src="bower_components/ng-youtube-embed/ng-youtube-embed.js"></script>
Then you need to add the same in dependencies as in the following:
- angular
- .module('yeomanApp', [
- 'ngAnimate',
- 'ngAria',
- 'ngCookies',
- 'ngMessages',
- 'ngResource',
- 'ngRoute',
- 'ngSanitize',
- 'ngTouch',
- 'satellizer',
- 'ngYoutubeEmbed'
- ])
- angular.module('yeomanApp')
- .controller('MainCtrl', function ($scope) {
- $scope.link = 'https://youtu.be/aHGmj_fqPLE';
- });
Last, but the not the least, template change
- <div>
- <ng-youtube-embed
- url="link"
- width="800px"
- height="500px"
- autohide="true"
- theme="light">
- </ng-youtube-embed>
- </div>

Thanks for joining me

Santhakumar MunuswamyPosted Aug 12, 2015, 3:18 PM
Nice. Thanks for sharing