AnsweredAssumed Answered

Confused about widget config files

Question asked by ZConlen@bellevuewa.gov_cobgis on Aug 10, 2018
Latest reply on Aug 10, 2018 by ZConlen@bellevuewa.gov_cobgis

HI

I'm hoping someone can shed some light on how widget config files are supposed to work. I'm extending existing widgets and creating new ones, and I found that I can't reference values in the config.json files (in the widget folder), either in widget.html or widget.js. My dev environment is using the pattern of writing code in source control, and using grunt to copy files to the sever. Using tools found in this esri git repo. After poking around at the deployed app, I see that the config.json file is not being used. The app is actually configured to use a config file like "...\server\apps\2\configs\FilterDateTime\config_widgets_FilterDateTime_Widget_21.json", which is not getting updated via my grunt task.

 

Is this expected? Not really documented - esri docs just make it seem like you edit the config.json file in the widget folder and that's it.

 

And not easy to manage, with the grunt task referenced above.

 

It looks like I can modify the the app config so that it uses the config.json file in the widget folder, but not sure that is advisable. I'm assuming the  way this is set up is meant to optimize performance.

 

Any clarification about this and about best practices for managing these config files would be appreciated.

 

Thanks

Outcomes