<input [(ngModel)]="Emp."+"dt.Rows[0]["columnname"]">
This scenario results in
an undefined value
In my current project, I am leveraging the power of a MVC CustomHtmlHelper
to generate
textboxes dynamically based on database schema
. The textboxes are rendering correctly but when trying to bind data to "Emp.Name", it throws an undefined error.
The issue seems to be related to how the object is declared and used within TypeScript.
<input [(ngModel)]="Name" >
Surprisingly, this approach works seamlessly
I am seeking guidance on how to dynamically define objects and their properties in the context of Angular 2
and MVC5
.