Skip to content

Instantly share code, notes, and snippets.

@odoe
Created June 1, 2015 15:46
Show Gist options
  • Save odoe/3285fd37ec5405599cf6 to your computer and use it in GitHub Desktop.
Save odoe/3285fd37ec5405599cf6 to your computer and use it in GitHub Desktop.
// original AMD version
define([
'views/MapView',
'views/LocatorView'
], function(
MapView, LocatorView
) {
var node = document.getElementById('map-area');
var node2 = document.getElementById('locator-area');
var mapView = new MapView(null, node);
var locatorView = new LocatorView(null, node2);
});
// ES6 syntax
import MapView from 'views/MapView';
import LocatorView from 'views/LocatorView';
var node = document.getElementById('map-area');
var node2 = document.getElementById('locator-area');
var mapView = new MapView(null, node);
var locatorView = new LocatorView(null, node2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment