Skip to content

Instantly share code, notes, and snippets.

@odoe

odoe/main.js

Created Jun 1, 2015
Embed
What would you like to do?
// 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