ybt
asked on
Load contact data and put it in html page as contact.last_name, contact.email etc. but need to get email in component.ts page
public ngOnInit()
{
this._routeSubscription = this._route.params
.pipe(switchMap(params => {
if (params.id.toString() === `create`)
{
this._isCreate = true;
return of({});
}
return this._contactsService.get(params.id);
}))
.subscribe(contact => {
this.contact = contact;
});
}
need to get contact.email to compare with edited value in html page, if user change and then change back, do not validate
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.