s

knockout data bind href and text in a tag edit button Edit

author
Murugan Andezuthu Dharmaratnam | calendar 27 January 2021 | 1663

how to data-bind href and text tag in an element using knockoutJs

Solution

If you want to data bind both an attribute and text using knockout js you can separate the attr and text by using a coma-like shown in the code below.

<a data-bind="attr: { href: URL}, text: Name"></a>