ng-submit not working in angularjs
Even if the button is inside the form and still ng-submit
is not working then change your button type
to submit.
<button type="submit" class="btn btn-success" ng-click="login()">Login</button>
P.S: Other answers did not help me until I changed the button type to submit
. Hope this helps.
Maybe you should add 'novalidate' attribute on the form tag to avoid native browser validation as indicated here https://docs.angularjs.org/guide/forms