AngularJS: Call the ng-submit event outside the form
问题 I'm a fish in AngularJS and I have this scenario. <form> <input type="text"> </form> <button type="submit">submit</button> In normal ways AngularJS provides the ng-submit directive to work as an attribute in the form but I need to call it outside. So, someone has experienced the same problem? If yes, what you did? 回答1: Please, surround your code with a ng-controller, and use ng-click on buttons out of scope of <form>. I make a sample on jsfiddle for you... try it: http://jsfiddle.net/xKkvj/2/