Implementing Password Confirmation with ngPassword
Jul 22, 2017 · 1 min read
Lets start with installing dependencies.For this project you need angularJS 1.X and ngPassword. You can get ngPassword from github here https://github.com/gdi2290/angular-password
Next declare ngPassword as a dependency angular.module('myapp',['ngPassowrd'])
Don’t forget to put ‘name’ in ‘form’ and ‘input’ elements.Notice second input has an attribute match-password="newPassword" . This attribute will match the content of the input field with name = 'confirmPassword' with the content of input with name = 'newPassword'.
Once again ‘name’ is important.

Put ng-message = 'passwordMatch' in the ng-messages followed by your custom message for unmatched passwords and voila! now you can have confirm password feature on your website too.
