-
Notifications
You must be signed in to change notification settings - Fork 14
Override ArcGIS JS API classes #32
Comments
It should not be. The solution is essentially the same as what I suggest for #24. As I said there, the tricky part is figuring out how to serve your Dojo modules so that they are accessible to the Dojo loader running in your app. I can't tell you exactly how to do that, b/c it depends on your build tools (webpack, angular-cli, etc). Let's say your app is going to run at
packages: [{
name: "application",
location: "/my-app/lib/application"
}]
esriLoader.loadModules(['application/Delete']).then([Delete] => {
// do something w/ your custom Delete module
}); Please excuse (and correct) and typos or inaccuracies in the above, I'm doing this from memory. |
Many thanks, it works. What a simple solution! You correctly answered my question, but... should I store that modules in the app's FYI: I'm running on angular-cli. |
Sorry, I can't advise you that b/c I don't use angular-cli, nor Angular for that matter, these days. Generally I would say use whatever is the recommended approach for persisting and serving static assets for whatever build/deploy tools you're using. If you figure out a good way to do that for angular-cli, would you mind posting it back here for others? |
I was discontented with inserting it in standard I've changed
Maybe, I'll find a solution, how to bundle my arcgis-js-api assets by build. My question was answered, so I will close this issue. Thank you, Tom! |
Hi, I'm looking for an advice for my current issue. In my former app, I was overriding some esri classes and used them with my own namespace 'application/XXX'.
For example:
Do you have any tips, how to override ESRI JS API classes in similarly way, but using Angular EsriLoader? Is it necessary, to make my own API build or something like that?
Thank you
The text was updated successfully, but these errors were encountered: