Created
February 6, 2020 23:08
-
-
Save luixaviles/ae266e5856254be46d4d572be5ded18c to your computer and use it in GitHub Desktop.
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
import {NgModule} from '@angular/core'; | |
import {YouTubePlayerModule} from '@angular/youtube-player'; | |
@NgModule({ | |
imports: [ | |
YouTubePlayerModule, | |
], | |
declarations: [YoutubePlayerExample], | |
}) | |
export class YoutubePlayerExampleModule { | |
} | |
@Component({ | |
template: '<youtube-player videoId="PRQCAL_RMVo" />', | |
selector: 'youtube-player-example', | |
}) | |
class YoutubePlayerExample implements OnInit { | |
ngOnInit() { | |
const tag = document.createElement('script'); | |
tag.src = "https://www.youtube.com/iframe_api"; | |
document.body.appendChild(tag); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment