Skip to content

Mapping an object in the spa #2

@sinamoradi1375

Description

@sinamoradi1375

Hello sir, I've been watching your videos for almost 2 months now and I have a problem in understanding a part of it and I didn't know anywhere else to ask it.
In Module 12 Episode 10, you assign an object from the register form to an empty object which will be cloned and mapped to the user property in the register component class. (2:38 of the episode).
So my question is, we don't have a dateOfBirth Property inside the user model in spa but the value that comes from the register form does and is assigned to the user and then is being sent up to the API and there seems to be nothing wrong with this. Could you shine a light on this matter please? thanks
this.user = Object.assign({}, this.registerForm.value);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions