if you want to implement a search bar on nav bar:
you should do
Second the form also benefit us a lot:
1, input box enter to submit.
2, button click to submit.
All done by ng-submit:
<form class="navbar-form" role="search" ng-submit="search()">
Any buttons in this form can trigger the submission, if you want to have a button without submission ability, you should do like this:
<button class="btn btn-default" type="button">just a button.</button>