Get Value of field of unmatched ng-pattern
<pre><code>            &lt;div&gt;
              &lt;input  type="text" name="rate" ng-model="rate" ng-pattern="/^[0-9]+(\.[0-9]{0,2})?$/"/&gt;
            &lt;/div&gt;
                &lt;span class="text-warning control-label"&gt;
                    {{rate}}
            &lt;/span&gt;
</code></pre>

<p>rate displays when a valid value is typed in the text field and shows up as NaN when an invalid value is typed. The ng-pattern accepts +numbers upto 2 decimals  , i'd like the rate to show up if i type 123.4567 or -383</p>