I am having one model(login.model.ts) in my angular project like below -
export class LoginModel{
public uName: string;
public uPassword: string;
}
I want to use this model as input parameter in method called 'login' in my service(authentication.service.ts) from where I am doing **POST** request. How can I do that? May be something like below.
login(LoginModel lm){
//my post request here
}
And inside this login method want to use like 'lm.uName' / 'lm.uPassword'
You can do it like below.