I'm creating anchor tag as:
var link = $('<a/>').text("Forget password").attr('href', '/Account/ForgetPassword');
and using it in jquery as:
$error = "Incorrect password." + link + " ?";
and using it in html as: (I'm using knockout)
<div data-bind="text:error"></div>
But the output is:
Incorrect password.[object Object] ?
How can I get the output as a link?
Update: I have used this:
$error = "Incorrect password." + link[0].outerHTML + " ?";
Now the output is:
Incorrect password.<a href="/Account/ForgetPassword">Forget password</a> ?
How to render this as html?