angular.io icon indicating copy to clipboard operation
angular.io copied to clipboard

i18n cookbook using JIT: System is not defined error

Open MeMeMax opened this issue 8 years ago • 0 comments

Following the i18n cookbook i get System is not defined. Im using latest Angular CLI. The issue comes up in the

<script>
  // Get the locale id somehow
  document.locale = 'es';

  // Map to the text plugin
  System.config({
    map: {
      text: 'systemjs-text-plugin.js'
    }
  });

  // Launch the app
  System.import('main.js').catch(function(err){ console.error(err); });
</script>

I loaded system.js as a dependency with npm install systemjs --save and included it to the scripts part in my angular-cli.json. But there is a timing issue as the

MeMeMax avatar Feb 11 '17 13:02 MeMeMax