1

In my below code only angular validation is working. When I click on login button, then no angular script works. Can some body help me? Where is my mistake?

   <div class=" col-sm-6">
    <button type="button" class="btn btn-default  center-blocks btn-save" ng-disabled="adminForm.$invalid" id="btn-save">Login</button>
    </div>
0

2 Answers 2

1

please try this

   <button type="submit" class="btn btn-default center-blocks btn-save" ng-disabled="adminForm.$invalid" id="btn-save">Login</button>

you need to button type to submit type.

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

Comments

1

You have to make your button type as type="submit". Currently it is type="button" which would not submit a form

Also make sure you have ng-sumbit="submit()" on your form level element.

Comments

Your Answer

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