title: HTML5 required field and submit with angularjs
body: <p>How to check the required fields of a form before submitting it in javascript ?</p>
  
  <p>I'm working with Angularjs and as you probably know, I never reload the page. 
  I have created input text like this :</p>
  
  <pre><code>&lt;input type="text" name="truck" ng-model="my model" typeahead="my typeahead" typeahead-min-length="1" required/&gt;
  </code></pre>
  
  <p>Here is my submit button at the end of the form :</p>
  
  <pre><code>&lt;button type="submit" ng-click="saveDelivery(newDelivery)" class="btn btn-primary"&gt;Create the delivery&lt;/button&gt;
  </code></pre>
  
  <p>But when I submit, I go into "saveDelivery" first, and then I have the message from Google chrome : "Please fill in this field..."</p>
  
  <p>How can I do to check the input before submitting ?</p>