title: Angularjs typeahead-input-formatter doesn't work when model value being set on page load
body: <p>I have a textbox that has a <code>typeahead</code> and <code>typeahead-input-formatter</code> attributes, to offer user sugestion list when they start typing and to store selected value in angularjs model but display text for the selected value in the textbox, for axample if model value to be set "jsmith" the textbox would display "John Smith" and it works fine when user selects suggested value from suggestion list, however when I retrieve existing record and trigger <code>typeahead-input-formatter</code> with 'ng-init' it does go through the code, but doesn't set display value of the textbox:</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;input ng-controller="TypeaheadCtrl" ng-init="travel.managerId" 
         ng-model="travel.managerId" type="text" 
         typeahead="suggestionEntry.userId as suggestionEntry.fullName for suggestionEntry in 
                    activedirectory($viewValue)" 
         typeahead-input-formatter="formatLabel($model)"&gt;
  </code></pre>
  
  <p>app.js</p>
  
  <pre><code>travelApp.controller('TypeaheadCtrl', function ($scope, $http, limitToFilter) {
  
      $scope.entries = [];
      $scope.activedirectory = function (empName) {
          return $http.get("api/activedirectory/GetActiveDirectoryEntries/" + empName).then(function (response) {
              $scope.entries = response.data;
              return limitToFilter(response.data, 20);
          });
      };
  
      $scope.formatLabel = function (model) {
          if ($scope.entries.length &lt; 1 &amp;&amp; model != undefined) {
              $http.get("api/activedirectory/GetActiveDirectoryEntries/" + model).success(function (data) {
                  $scope.entries = data;
  
                  for (var i = 0; i &lt; $scope.entries.length; i++) {
                      if (model == $scope.entries[i].userId) {
                          return $scope.entries[i].fullName;
                      }
                  }
              }).error(function () {
                  alert('Error reading JSON file.');
              });
          }
  
          for (var i = 0; i &lt; $scope.entries.length; i++) {
              if (model == $scope.entries[i].userId) {
                  return $scope.entries[i].fullName;
              }
          }
      }
  });
  </code></pre>
  
  <p>Please advise.</p>