@ViewChild always returns undefined

前端 未结 3 630
北恋
北恋 2021-02-13 14:36

I know this has been asked before, but none of the selected answers are working for me.

I am trying to use @ViewChild to get my ng-select from t

3条回答
  •  别那么骄傲
    2021-02-13 14:39

    In my case, I encountered the same problem. I console.log()-ed the content that is retrieved from the child component and it gives me 'undefined'.

    And I solved it by merely refreshing the page. ctrl+shift+R may help. I guess it's because the cache of the browser that leads to this problem.

提交回复
热议问题