i have an Agent class
export class Agent{
ID:number;
Name: string;
}
And in component i have a variable of this class array
public agents : Agent[];
Now how can i push values in this variable? I have tried following methods but no one worked.
agents.push({"ID":1,"Name":"Abc"});
agents.push(new Agent(){"ID":1,"Name":"Abc"});