About "Webpack"
Closed this issue · 14 comments
It is great to see "webpack" work in the project. I have several questions on it, it looks like "esri-system-js" is not necessary for webpack and all the ESRI Javascript library(3.16) can be loaded. if so, all the functionality of the library can be used to develop application... it should work in ESRI Javascript library (4.0) as well. I tried this project in ASP.NET core 1.0 RC2, and it works nice(can be uploaded sometimes in the future). I am wondering if all the functionalities of the javascript library(3.16 / 4.0) can be used in the future project?
Sorry for the late reply on this (I thought I had already responded):
- Yes, if you use webpack, you don't need SystemJS, and vice versa. You only need one.
- You should be able use the ArcGIS API for JavaScript v4.x w/ webpack, see lobsteropteryx/esri-webpack-typescript#1
- Part of the purpose of this repo is to show Angular 2 working w/ ArcGIS API for JavaScript v3.x, so I have no plans to migrate it to 4.x.
- I don't know what ASP.NET core 1.0 RC2 is. This repo has no .Net code in it, and never will. However, I'm glad to hear that it's working w/ in ASP.Net core 1.0 RC2 project.
W/r/t using " all the functionality of the library can be used to develop application" - I haven't tested this, but you should be able to use any module included whichever version (3.x or 4.x) of the ArcGIS API for JavaScript that you've included on the page. That said, for generic tasks (like Ajax or DOM manipulation) that aren't related to working with the map, layers, or ArcGIS services, you should favor using the modules that come w/ Angular 2 rather than those included in esri or dojo packages included w/ the ArcGIS API for JavaScript.
Thanks for your reply very much. I have another question, do you have plan to write "sample components", like examples in https://developers.arcgis.com/javascript/3/jssamples/ or developing standard components(like what in "angular2-esri-example" project) in the near future?
I don't currently have plans to create any sample pages or develop any more components for this example app. My hope is that what's here is enough to demonstrate to people how to use the map and widgets from the ArcGIS API for JavaScript in an Angular 2 app.
Is there something specific that you are trying to do with the ArcGIS API for JavaScript in an Angular 2 app that this example app does not help you with?
Thanks for your quick reply.
It is hard to try and test if all the esri dojo library can work well in Angular 2 because the library is too big. I try these "component" and work fine in angular material2, so I am wondering if all the library work well in Ng2. It Will be helpful if there are lots of "components" available in the future.
I understand your concern. It would be ideal if there were samples of every Esri module working in an Angular 2 app, but, as you said, the library is too large.
Instead, my intent here was to try and demonstrate ways to use at least one of each type of ArcGIS API for JavaScript (v 3.x) module (map, dijits, utility, etc) with various types of Angular 2 components and data binding.
Based on the examples of successful integration in this repo along with those in angular2-esri-playground, I feel very confident that the rest of the components in both the 4.x and 3.x versions of the ArcGIS API for JavaScript should work in Angular 2 apps.
If there's some specific compatibility that you want to know about that, feel free to open an issue here (for 3.x) or here (for 4.x).
Also, I'm glad to hear that you've gotten the components to work well w/ Angular 2 Material! I would encourage you to share a link if you have one.
Thanks for your help. What I am concerning about the esri JavaScript library now is try to add some functionality like click map and display the related info to the sidenav.
I developed "angular2-esri-example" as an example in the aspnet/JavascriptServices framework by Steve Sanderson. Sidenav and other angular material2 components used in this example and it works fine. I try to use dynamic loading Gis component to the sidenav but some issues(issues from the angular2). I can add the sidenav component from angular material2 for this project and upload it in the near future.
If you can upload the code somewhere I'd be glad to look at it.
Was your question resolved in this issue?
Thanks, there are lots of new features in 4.0, I finished the function in 4.0 and make it works in 3.17 as well.
Another question. When will you guys start to work on or publish Angular2 Javascript API officially?
At this point there is no plan for any "official" integration library between the ArcGIS API for JavaScript and Angular 2. I'm not convinced that one is needed. I think there are multiple patterns to successfully loading Esri modules (i.e. esri-system-js vs webpack). I don't think it makes sense to create re-usable components or services.
Agreed, @tomwayson.