title: Validate URL with AngularJS and HTML 5
body: <p>Good morning all:</p>
  
  <p>Looks like a very common question, but after googling for hours I am not able to figure this out: how to validate an URL including <code>www</code> without <code>http</code>.</p>
  
  <p>These is what I did:</p>
  
  <ol>
  <li>Used the input type url: it does not accept <code>www.google.com</code>;</li>
  <li>Changed the input type to <code>text</code> and used <code>ng-pattern</code>: I still get the <code>www.google.com</code> invalid;</li>
  <li>Changed different regex but still not working.</li>
  </ol>
  
  <p>So when I click on the submit button, I show an alert if the form is invalid (true invalid, false valid). Here is <a href="https://plnkr.co/edit/3RhcF2LdEcvmwymxZ6Hp" rel="nofollow noreferrer">my Plunker</a></p>
  
  <p>Thanks for the help</p>