Link to home
Start Free TrialLog in
Avatar of ybt
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;
         }); 
    }

Open in new window

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
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial