我使用 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;
有用。我没有得到静态的作用以及像以前一样工作的价值是什么?