Angular 2 RC 5

Angular 2

Angular 2 RC 5



We tested our Angular 2 Components with the latest version of Angular 2 – Angular 2 RC 5 and we are happy to share with you that we did not encounter any issues. Actually, what we see is better performance and loading time compared to previous Release Candidates. Below, you will find a sample systemjs.config.js which can be used with our Angular 2 samples. It is configured in such way that the latest version of Angular 2 is always used.
(function (global) {
    // map tells the System loader where to look for things
    var map = {
        'app': 'app', // 'dist',
        '@angular': 'https://npmcdn.com/@angular',
        'angular2-in-memory-web-api': 'https://npmcdn.com/angular2-in-memory-web-api',
        'rxjs': 'https://npmcdn.com/rxjs',
        'ts': 'https://npmcdn.com/plugin-typescript@4.0.10/lib/plugin.js',
        'typescript': 'https://npmcdn.com/typescript@1.8.10/lib/typescript.js'
    };
    // packages tells the System loader how to load when no filename and/or no extension
    var packages = {
        'app': { main: 'main.js', defaultExtension: 'js' },
        'rxjs': { defaultExtension: 'js' },
        'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' },
    };
    var ngPackageNames = [
      'common',
      'compiler',
      'core',
      'forms',
      'http',
      'platform-browser',
      'platform-browser-dynamic',
      'router',
      'router-deprecated',
      'upgrade',
    ];
    // Individual files (~300 requests):
    function packIndex(pkgName) {
        packages['@angular/' + pkgName] = { main: 'index.js', defaultExtension: 'js' };
    }
    // Bundled (~40 requests):
    function packUmd(pkgName) {
        packages['@angular/' + pkgName] = { main: 'bundles/' + pkgName + '.umd.js', defaultExtension: 'js' };
    }
    // Most environments should use UMD; some (Karma) need the individual index files
    var setPackageConfig = System.packageWithIndex ? packIndex : packUmd;
    // Add package entries for angular packages
    ngPackageNames.forEach(setPackageConfig);

    var config = {
        // DEMO ONLY! REAL CODE SHOULD NOT TRANSPILE IN THE BROWSER
        transpiler: 'ts',
        defaultJSExtensions: true,
        typescriptOptions: {
            tsconfig: true
        },
        meta: {
            'typescript': {
                "exports": "ts"
            }
        },
        map: map,
        packages: packages
    }
    System.config(config);
})(this);
Try our Angular 2 Demos.

About admin


This entry was posted in Angular 2, AngularJS and tagged , , , , , . Bookmark the permalink.



Leave a Reply