Let's add some dynamic functionality. We'll disable the 'Save Changes' button if there are no changes to the form.
We'll also make the alert box hidden unless there have been changes made.
Add updateUser() Method
Now, we need to stub out the updateUser() method we're using to submit our form.
We don't have the method on our backend, so for now - we can just console.log our form and verify that it's working correctly.
In member-edit.component.ts, add the following method and inject alertify into the constructor:
Our submit button is outside of our form, so we need to "hook up" the button and the form.
Toggle the Information Panel
Our information box informing the user that changes have been made doesn't disappear after hitting submit at the moment.
Let's do this with ViewChild - the template is considered to be a child of the component. We can access the properties of the form with @ViewChild(). :