How can I select an element in a component template?

后端 未结 12 2122
挽巷
挽巷 2020-11-21 06:56

Does anybody know how to get hold of an element defined in a component template? Polymer makes it really easy with the $ and $$.

I was just

12条回答
  •  死守一世寂寞
    2020-11-21 07:19

    In case you are using Angular Material, you can take advantage of cdkFocusInitial directive.

    Example:

    Read more here: https://material.angular.io/cdk/a11y/overview#regions

提交回复
热议问题