Access a DOM element in Aurelia

后端 未结 5 1116
独厮守ぢ
独厮守ぢ 2021-01-07 17:09

How would you go about accessing a DOM element in Aurelia? This is a broad and general question, but I have a feeling there are one or two preferred ways to do this. I have

5条回答
  •  半阙折子戏
    2021-01-07 17:43

    Just as another point I came across when trying to use this for myself, the ref variable isn't available during construction, and this isn't clear in the documentation. You can begin to reference the element as mentioned above (http://aurelia.io/hub.html#/doc/article/aurelia/binding/latest/binding-basics/5) anytime during or after the attached method is called.

提交回复
热议问题