Angular @ViewChild() error: Expected 2 arguments, but got 1

后端 未结 11 2632
时光取名叫无心
时光取名叫无心 2020-11-29 18:10

When trying ViewChild I am getting the error. Error is \"An argument for \'opts\' was not provided.\"

Both @ViewChild is giving the error.



        
11条回答
  •  自闭症患者
    2020-11-29 18:26

    Regex for replacing all via IDEA (tested with Webstorm)

    Find: \@ViewChild\('(.*)'\)

    Replace: \@ViewChild\('$1', \{static: true\}\)

提交回复
热议问题