rock rock - 4 months ago 46
AngularJS Question

ng-submit not working in angular js

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>

Answer

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.