Use embed
URL and this should work.
window.open('https://www.youtube.com/embed/v8WjMiodcKo');
- EDIT
Second option is to use '_system',
as in example
window.open('https://www.youtube.com/watch?v=v8WjMiodcKo', '_system');
- EDIT
3.1. Download this npm package $ npm install --save angular-youtube-embed
.
3.2. Copy angular-youtube-embed.js from \node_modules\angular-youtube-embed\src\angular-youtube-embed.js to www\js
3.3. Add 'youtube-embed'
dependency in app.js
3.4. Add this to index.html
<script src="https://www.youtube.com/iframe_api"></script>
<script src="js/angular-youtube-embed.js"></script>
3.5. Create a controller
.controller('YoutubeCtrl', function($scope) {
$scope.BestFriends = 'v8WjMiodcKo';
})
3.6. Add this to html page
<youtube-video video-id="BestFriends" player-width="'100%'" player-height="'300px'"></youtube-video>