I have an issue with a form in angular where the submit button in the form just causes the form to do the standard submit instead of running what is defined in ng-click. It is as if what is ng-click isn't even being called.
Here is the html and js
<form ng-controller="formController" name="create_champion_form">
{{ create_champion_form.as_p }}
<button ng-click="submit()">Hello</button>
</form>
urm.controller('formController', function($scope) {
$scope.submit = function() {
alert("Working");
};
});
Any ideas on this issue would be great as I have been trying for a few days and nothing I have tried has worked.
I think you forgot to include 'ng-app' in your app. I have tried this and its working fine. working code is:
Html:
Javascript: