0

Hi all I am new to Angular, I have to work on login application as of now iam using static json values and my json is given below

{
    "records": [
        {
            "Name": "sudhir",
            "Password": "ptg"
        },
        {
             "Name":"manne",
             "Password":"ptg123"
        }
    ]
}

Using this Json i have to work on login application so please tell me how to validate this users in my controller if possible give me the answer with code.

4
  • Hi @ChrisHermut Please help me if u know the answer Commented Dec 9, 2015 at 9:24
  • docs.angularjs.org/guide/forms you will find your answer here Commented Dec 9, 2015 at 9:27
  • 1
    The user validation should always be server side. Inside your web you should check only if the server has validated your user and that you have some user info inside a local storage or a globally accessible variable in order to access it whenever you move inside your app Commented Dec 9, 2015 at 9:28
  • because this can't be overstated, in the exact words of @Synapse: "The user validation should always be server side. Inside your web you should check only if the server has validated your user and that you have some user info inside a local storage or a globally accessible variable in order to access it whenever you move inside your app" Commented Dec 9, 2015 at 9:30

1 Answer 1

1

Since it looks that your quite new to Angular I would suggest looking at:

http://jasonwatmore.com/post/2015/03/10/AngularJS-User-Registration-and-Login-Example.aspx

https://www.youtube.com/watch?v=C21JNx6hE1w

Or just use any SE. There's plenty of tutorials that will give you a step by step solution to building/validating login form.

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

Comments

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.