51

次のように ViewChild を使用していました。

@ViewChild("InternalMedia") localStream;
@ViewChild("emoji") mEmoji;

angular-7.xまでは正常に機能していました

angular-8.xにアップグレードするとすぐに、次のエラーが発生し始めました

.../call_emoji/component.ts(41,4): error TS2554: Expected 2 arguments, but got 1.

https://angular.io/api/core/ViewChildを確認し、変更すると

@ViewChild("InternalMedia",{static:false}) remoteStream;

できます。static の機能がわかりません。以前のように機能する価値は何ですか?

4

2 に答える 2