title: Show last few characters when data binding in angularjs
body: <p>I understand how data binding works in this simple example, however I'm curious on how you could limit the output to display only the last 4 characters of whatever number you put in, instead of the entire number:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html ng-app&gt;
    &lt;head&gt;
      &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div&gt;
        &lt;label&gt;Name:&lt;/label&gt;
        &lt;input type="text" ng-model="number" placeholder="Enter a long number here"&gt;
        &lt;hr&gt;
        &lt;h1&gt;Hello {{number}}!&lt;/h1&gt;
      &lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>How would you go about doing this?</p>