require.js and commonjs issue & couch potato lazy loading not working #121
Description
From @cscrum on September 29, 2015 21:58
I have a project using require.js and couch potato to perform lazy loading for the modules. For some reason, when using the latest version of angular-leaflet with the simple-logging, the entire application will fail to load when I try to include the leaflet-directive in the controller for the map. Using a version prior to the simple-logging requirement works except I'm having the old resizing issue so I want to try the new version. Here are some code snippets...
This is setting up the module:
define(['angular',
'angular-couch-potato',
'angular-ui-router',
'ng-table',
'ngStorage',
'nemLogging',
'treeControl',
'ng-file-upload',
'leaflet',
'vincenty',
'leaflet-directive',
'd3',
'line-chart',
'angular-bootstrap',
'Bing'
], function (ng, couchPotato) {
"use strict";
var module = ng.module('app.network', ['ui.router', 'ngTable','ngStorage','treeControl','ngFileUpload','n3-charts.linechart','ui.bootstrap.modal','leaflet-directive']);
couchPotato.configureApp(module);
module.config(function ($stateProvider, $couchPotatoProvider) {....
If I remove 'leaflet-directive' from the
var module = ng.module('app.network', ['ui.router', 'ngTable','ngStorage','treeControl','ngFileUpload','n3-charts.linechart','ui.bootstrap.modal','leaflet-directive']);
then the application loads, but of course mapping doesn't work. If I simply replace the new angular-leaflet.js with an older version of the file and include the 'leaflet-directive', the the mapping works, however I have resizing issues. Any ideas out there?
Copied from original issue: tombatossals/angular-leaflet-directive#965