title: Angularjs adding service
body: <p>Html page code:</p>
  
  <pre><code>ng-click="removeCoupon(coupon.couponId)"
  </code></pre>
  
  <p>controller:</p>
  
  <pre><code>$scope.removeCoupon=adminService.removeCoupon(Id)
    .then(
              function(response) {
                  hide_all_and_show_one_insideTab( 'successLog');
            $scope.log = "Coupon Id# " + Id + " successfully removed.";
              adminService.getCoupons()
          .then(
              function(response) {
                  $scope.coupons = response.data;
              } );
  
              } );`
  </code></pre>
  
  <p>service:</p>
  
  <pre><code>     this.removeCoupon = function(Id){
       return $http.get(baseURL+"admin/removeCoupon/"+Id);
                                  };
  </code></pre>
  
  <p>when i load the html, there is an eror 
  "angular.js:13424ReferenceError: Id is not defined
      at new  (controller1.js:56)"</p>
  
  <p>Someone can point my eror? before i did it without service and it worked just fine, so the ng-click successfuly transfer the coupon.couponId, now when i try to transfer all the server calling to a service, i get this eror.
  the controller1 js.56 is the 1st line of the controler code i wrote here.</p>