1
0
mirror of https://github.com/videojs/video.js.git synced 2024-11-28 08:58:46 +02:00

docs(angular): fix demo for angular v8+. (#6581)

Without the `static: true` property, an `not defined ReferenceError` will be thrown since the target is null on init.
This commit is contained in:
EdgeNeko 2020-04-10 03:51:23 +08:00 committed by GitHub
parent 04e64622b3
commit 8f930c5857
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,7 @@ import videojs from 'video.js';
encapsulation: ViewEncapsulation.None,
})
export class VjsPlayerComponent implements OnInit, OnDestroy {
@ViewChild('target') target: ElementRef;
@ViewChild('target', {static: true}) target: ElementRef;
// see options: https://github.com/videojs/video.js/blob/master/docs/guides/options.md
@Input() options: {
fluid: boolean,