I want to know why Aurelia oneTime binding is behaving like this. I have an HTML like this.
<span> ${dbaName & oneTime}</span>
<input type="text" value.bind="dbaName" spellcheck="false" />
My View-model is like this in typescript and after the success of ajax call i am assigning the value to dbaName :
export class VendorGeneral
{
dbaName:string;
constructor()
{
}
activate()
{
$.ajax({
url: "servicecall",
context: document.body
}).done(function() {
this.dbaName = "DATA ADMIN";
});
}
}
Now What HTML will show the output as:
<span> ${dbaName & oneTime}</span> **blank**
<input type="text" value.bind="dbaName" spellcheck="false" /> **DATA ADMIN**
In Span, I will get blank value or an empty string whereas in the textbox I will get Data Admin as a value which is correct.
Please let me know why oneTime bind is giving empty string and how to fix this?