Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

README.md

Dojo loader plugin for SystemJS

Installation

First install this plugin with npm:

npm install systemjs-plugin-dojo

Then add map to the loader:

SystemJS.config({
    map: {
        'dojo-loader': 'node_modules/systemjs-plugin-dojo/dojo.js'
    }
});

Setup

First make sure dojo or esri works through dojoConfig, for example:

(function (global) {
    'use strict';
    global.dojoConfig = {
        async: true,
        baseUrl: '.',
        packages: [
            { name: 'dgrid', location: 'bower_components/dgrid' },
            { name: 'dijit', location: 'bower_components/dijit' },
            { name: 'dojo', location: 'bower_components/dojo' },
            { name: 'dojox', location: 'bower_components/dojox' },
            { name: 'dstore', location: 'bower_components/dstore' },
            { name: 'moment', location: 'bower_components/moment' },
            { name: 'esri', location: 'bower_components/esri' }
        ]
    };
})(window);

And link dojo in your html file:

<script src="dojoConfig.js"></script>
<script src="bower_components/dojo/dojo.js"></script>

Then config all dojo related package load with the loader, for example:

SystemJS.config({
    meta: {
        'dojo/*': { loader: 'dojo-loader' },
        'esri/*': { loader: 'dojo-loader' }
    }
});

Demo

See ng2-esri-demo for more details.

License

MIT

Special thanks to

About

Dojo loader for SystemJS

Topics

Resources

License

Packages

No packages published
You can’t perform that action at this time.