Hello,
I have a user class
export class User {
constructor(
public email: string,
public password: string) { this.email=email;this.password=password}
}
I'm storing the values of this class in an array like this
users :User[]= [
];
after I create an add_user function that allows to add a user
add_user(user:User)
{
this.users.push(the problem is here );
console.log(this.users);
this._router.navigate(['login']);
}
ho can i do please ?
thanks in advance
3 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Manav PandyaPosted Jan 28, 2018, 3:43 AM
Dev TeywaPosted Jan 24, 2018, 1:24 PM
Mangesh GPosted Jan 24, 2018, 11:28 AM