79628930

Date: 2025-05-19 14:27:06
Score: 1.5
Natty:
Report link

//In component

console.log('User before passing to service', user); this.userService.addUser(user);

//in service give with below spread operator check once keep the debugger verify at what point it cuasing the issue.

const newUser = { ...user, id: this.users.length + 1 }; this.users.push(newUser);

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: rj26