tomwayson / esri-angular-cli-example

Example of how to to use the ArcGIS API for JavaScript in an Angular CLI app

Home Page:https://tomwayson.github.io/esri-angular-cli-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Show how to load the API and required modules in a route's resolve

tomwayson opened this issue · comments

Looks like this isn't as straight forward in Angular2 as it was in Angular:

https://www.codementor.io/angularjs/tutorial/angular-2-route-resolves--typescript
http://blog.thoughtram.io/angular/2016/10/10/resolving-route-data-in-angular-2.html

Otherwise I would have included as part of #1

I am starting to look into this now and should have a PR ready in the next few days

@kgs916 that's awesome.

My idea was that the route would be responsible for providing the esri/Map module to the component, and the component can just be responsible for drawing the map.

FYI - later today/tonight I'm going to make a couple of minor wording changes on the /home route and some style/basemap changes on the /map route and then was going to cut a release, so you may have to rebase before PRing.

Sounds good, @tomwayson. Thanks for the heads up about the upcoming changes!

FYI - my minor wording and style tweaks to your awesome lazy-loading PR have been pushed to master, and is up on gh-pages https://tomwayson.github.io/angular-cli-esri/. You'll want to pull and rebase before PRing any work on this issue.