# Dynamically add custom attribute to element

**URL:** <https://discourse.aurelia.io/t/dynamically-add-custom-attribute-to-element/1400>\
**Category:** Help Requests\
**Created:** [July 6, 2018, 7:15am UTC](https://discourse.aurelia.io/t/dynamically-add-custom-attribute-to-element/1400 "2018-07-06T07:15:16Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![rluba](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/rluba/32/836_2.png) [@rluba](https://discourse.aurelia.io/u/rluba)\
**Post date:** [July 9, 2018, 6:38am UTC](https://discourse.aurelia.io/t/dynamically-add-custom-attribute-to-element/1400/6 "2018-07-09T06:38:17Z")

</div>

> [@MaximBalaganskiy](#):
>
> Or create your own route-href which will take an additional parameter

That’s what I did as a workaround, but it’s not a solution for the general case.

> [@MaximBalaganskiy](#):
>
> Add a custom attribute and use templatingEngine to enhance the element

That’s what I’d like to do, but I couldn’t find any example of how to do it properly. Do you have any references to where that has been done?

---

_[View the full topic](https://discourse.aurelia.io/t/dynamically-add-custom-attribute-to-element/1400)._
