My challenge involves setting up a profile page with options to update username, password, and email. I've managed to get the "change email" and "change password" functions working smoothly. However, when I try to apply the same method to "change name", it seems to be causing issues.
I attempted to use the safe navigation operator (?) but unfortunately, that didn't solve the problem. I would greatly appreciate any guidance on where I might be going wrong.
Here is a snippet of the code I'm working with:
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
{...}
export class ProfilePageModule {}
Next, here is the HTML code for the profile page:
<ion-header>
{...}
</ion-content>
Moving on to the TypeScript code for the profile page:
import { Component, OnInit } from '@angular/core';
{...}
export class ProfilePage implements OnInit {
{...}
}
Lastly, here is the service handling the profile functionalities:
import { Injectable } from '@angular/core';
{...}
export class ProfileService {
{...}
}
The error messages I'm encountering are:
ERROR TypeError: "this.profileService.getUserProfile(...) is undefined"
ERROR Error: "Uncaught (in promise): TypeError: this.userProfile is undefined