1

https://embed.plnkr.co/oCd2WrzJjFtvgsGdHrdV3b/

Hello , I created Login page and Register page. But I need to add an additional functionality of confirm password. I am pretty confused in handling this with my controllers.

can anyone help me in validation part.

When I give Ng-match or directives , it is not compatible with my existing controller. Either it states Registration successful in case of wrong password or else my view is just empty in browser.

2
  • 1
    this question has been asked before here: stackoverflow.com/questions/14012239/… Commented Feb 27, 2016 at 14:23
  • When I give Ng-match or directives , it is not compatible with my existing controller. Either it states Registration successful in case of wrong password or else my view is just empty in browser. Commented Feb 27, 2016 at 15:03

2 Answers 2

2

Use following ng-match directive

http://ngmodules.org/modules/ng-match

Sign up to request clarification or add additional context in comments.

1 Comment

When I give Ng-match or directives , it is not compatible with my existing controller. Either it states Registration successful in case of wrong password or else my view is just empty in browser.
1

plnkr.co/edit/LRXKpql1AxmGNcTWifGS?p=preview

I solved the issue you faced with confirmPassword. I'm just saying where you made the mistake 1)password name in ng-modal and name in "required data-password-verify" at confirm password should match when you compare two passwords. 2)Please have a look at console first,then you understand where you did a mistake.Console clearly saying two issues i.e app is not defined at passwordVerify.js and User service not defined. 3)I changed passwordVerfiy directive to register controller and I commented userservice wherever i find.Because I have not seen anywhere you are using Userservice class.Both the files(user.service and user.service,localstorage) are empty

I would be more happy if my code resolve your problem. Thank you

6 Comments

Yes thank you. I will follow up using console to check out my errors.
Ashok Reddy.. I have one more doubt. plnkr.co/edit/zl4prZVBIRzp1CzpbyE3?p=preview I have local storage to store my datas locally , what if I want to move datas to server side using JSOn. Namely My JSon is .REGISTER CANDIDATE ------------------------ URL : localhost:8080/Registration?request={JSONREQUEST} -----
REQUEST: -------- {"json": {"request": {"servicetype":"21", "functiontype":"1001", "data":{ "email":"[email protected]", "password":"12345", "retypepassword":"12345" } } } } RESPONSE : ---------- { "json":{ "response":{ "servicetype":"21", "functiontype":"1001", "statuscode":"0", "statusmessage":"Success" } } }
I didn't get you exactly.But as far as I understand you need to send data to server as JSON. for this use $http.post('api/register', JSON.stringify(formData)). in your user service. It will stringify you data as JSON automatically
yes You are correct , I need to send datas from registration page to server . So dont I have any use with URL : localhost:8080/Registration?request={JSONREQUEST} .
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.