How can i set the id of a link-to component in ember

129 Views Asked by At

I am trying to add ids to elements in Ember 2.4 to facilitate automated testing. However, elementId on link-to does not seem to be respected, and gets ignored.

Is there any way to force the id of a link-to component

1

There are 1 best solutions below

0
Staale On

The following works:

{{link-to "route" id="elementId"}}

Not sure why I didn't get this when testing initially. I must have done something wrong when verifying this.