title: Define global constants
body: <p>In Angular 1.x you can define constants like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>angular.module('mainApp.config', [])
      .constant('API_ENDPOINT', 'http://127.0.0.1:6666/api/')
  </code></pre>
  
  <p>What would be the equivalent in Angular (with TypeScript)?</p>
  
  <p>I just don't want to repeat the API base url over and over again in all my services.</p>