This article mainly introduces the function of modifying the password of AngularJS front-end page operations, and analyzes AngularJS's judgment and Operation Skills on modifying the password of front-end users based on specific instance forms, for more information about how to change the password of AngularJS front-end pages, see the next article. This article describes how to use AngularJS front-end users to change their passwords, for more information, see
This document describes how to change the password of an AngularJS front-end page. We will share this with you for your reference. The details are as follows:
Recently, I am working on front-end design. I mainly use AngularJS and nodejs for page display and Data Request and processing. When designing pages such as forgetting passwords, it is important to find an effective design idea.
For example, to change the password, we need to display the prompt information to the user and clearly tell the user that there is a problem during the operation, this requires defining detailed variables and displaying information at different locations on the page. The following code is a simple example written by myself to record the learning process.
ChangePwd
Var app = angular. module ("myapp", []); app. controller ('changpwdctrl ', function ($ scope) {$ scope. name = "xiaozhang"; $ scope. pwd = "hello"; $ scope. newPwd = "hello1"; $ scope. rNewPwd = "hello2"; $ scope. submit = function () {$ scope. reseltNotRule = ''; $ scope. resultNotSame = ''; $ scope. result = ''; $ scope. resultSuccess = ''; if (! ($ Scope. name & $ scope. pwd & $ scope. newPwd & $ scope. rNewPwd) {$ scope. result = "please fill in the complete";} else if ($ scope. newPwd! = $ Scope. rNewPwd) {$ scope. resultNotSame = "two passwords inconsistent";} else if ($ scope. pwd = $ scope. newPwd) {$ scope. result = "New and Old passwords cannot be consistent ";}}});
Then the specific display information can be embodied. The basic idea is to use angular's two-way data binding for data analysis to display different information.
The above is a detailed explanation of the sample code for the user password modification function on the AngularJS front-end page. For more information, see other related articles in the first PHP community!