title: using regular expression in ionic
body: <p>I'm using Ionic to display a list of contacts from a user. So, when the user enters the number and clicks the add button it should display like (011)123-1234 in the list, and this should be followed for each entry. I tried to set the pattern in the tag but couldn't display the phone number. Please help me.</p>
  
  <pre><code>&lt;input type="tel" maxlength="10"  ng-model="phone" pattern="/(?:\(?\+\d{2}\)?\s*)?\d+(?:[ -]*\d+)*$/"&gt; &lt;br&gt;
       &lt;button ng-click="home()"&gt;Home&lt;/button&gt;&lt;/n&gt;
       &lt;button ng-click="add()" value="Add"&gt;Add&lt;/button&gt;&lt;br&gt;
  </code></pre>