title: Angular.js : How to bind "change" event to service
body: <p>First of all, I'm new to angular.js...</p>
  
  <p>I have a HTML5 page where I can add new URLs with a name. Now, I want to have a check to a back-end service to check if the URL already exist. How can I bind the “onChange” event on the input boxes to a service function? 
  I have tried to find the solution, but I have not been able to find anything that describes this easily.</p>
  
  <pre><code>&lt;div ng-controller="newLink"&gt;
  &lt;input class="url" value="{{Url}}" ng-model="Url" placeholder="Please type a URL"/&gt;
  &lt;input class="name" value="{{Name}}" ng-model="Name" placeholder="Type a name" /&gt;
  &lt;div class="status"&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;script&gt;
          app.controller('newLink', ['$scope', 'appService', function ($scope, appService) {
          $scope.Name = '';
          $scope.Url = '';
      }]);
  &lt;/script&gt;
  </code></pre>