title: How do I make an Angular service using typescript?
body: <p>I have a service code using typescript and AngularJS like this :</p>
  
  <pre><code>/// &lt;reference path='../_all.ts' /&gt;
  
  module bankApp {
      'use strict';
  
      export class MDCurrencyService implements IMDCurrencyService {
          httpService: ng.IHttpService;
          promise: ng.IPromise&lt;void&gt;;
  
          constructor($http: ng.IHttpService,
              $q : ng.IQService) {
  
              this.httpService = $http;
          }
  
          get(): MDCurrency[] {
              var promise = this.httpService.get('/Master/CurrencyGetAll').then(function (res) {
                  return res.data;
              });
              return promise;
          }
  
  
          save(cur: MDCurrency) {
              this.httpService.post('/Master/CurrencySave', cur);
  
          }
  
          softDelete(id: string)
          { }
  
          hardDelete(id: string)
          { }
  
  
  
  
      }
  }
  </code></pre>
  
  <p>I will use my controller like this :</p>
  
  <pre><code>this.currencies = $scope.currencies = mdCurrencyService.get();
  </code></pre>
  
  <p>How do I make an angular service $http using typescript?
  I'd like it so that this.currencies in my controller will be filled with data from the server.</p>