angular-fullstack / generator-angular-fullstack

Yeoman generator for an Angular app with an Express server
https://awk34.gitbook.io/generator-angular-fullstack
6.13k stars 1.24k forks source link

Update settings.html #2709

Open JosephSKh opened 6 years ago

JosephSKh commented 6 years ago

sending the form in changePassword function

Awk34 commented 6 years ago

How about doing the same as the login and sign up pages? ex: https://github.com/angular-fullstack/generator-angular-fullstack/blob/master/templates/app/client/app/account(auth)/login/login.html#L9

JosephSKh commented 6 years ago

@Awk34 I think you've already done that? you are sending the form in the function, please point me if I'm wrong

Awk34 commented 6 years ago

Take a look at this plunker: https://plnkr.co/edit/gmiLd1h7reY7XHLmbHgn?p=preview

Using this in the template sends the component instance, which is not what we want. Passing the ngForm instance is what we want, which includes data like valid, etc.