Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (37 sloc) 778 Bytes
title
System.js

To load moment, place it in the path specified by your System.config in the baseURL configuration. Then import it into your page.

<script src="system.js"></script>
<script>
  System.config({
    baseURL: '/app'
  });

  System.import('moment.js');
 </script>

If you need moment to be loaded as global, you can do this with the meta configuration:

System.config({
  meta: {
    'moment': { format: 'global' }
  }
});

Alternatively, to provide Moment as a global to only a specific dependency, you can do this:

System.config({
  meta: {
    'path/to/global-file.js': {
      globals: {
        moment: 'moment'
      }
    }
  }
});