Pressing 'Enter' executes Cancel button instead of Submit
The default type
for buttons is submit
. You have to explicitly unset it to "button"
to avoid the submit action:
<p class="stdformbutton"> <button class="btn btn-default" type="button" ui-sref="app.project.list">Cancel</button> <button class="btn btn-primary" type="submit">{{saveMessage}}</button></p>
You can also set the type="reset"
if you want it to clear out the input
values.