I need to create a custom widget that could calculate the value according to a model( function). For example, the user enters two values for the parameter a and b, then we need to display the result of f(a,b).
Is there any sample code to recommend?
Solved! Go to Solution.
Thanks for your sample!
It works well in our web application. But when we copy the widget file to the samplewidgets files( follow the link:Create a custom in-panel widget—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developer... ), it can not work in the demo widget. The error is as follow:
Error: dijit._WidgetsInTemplateMixin: parser returned unfilled promise (probably waiting for module auto-load), unsupported by _WidgetsInTemplateMixin. Must pre-load all supporting widgets before instantiation.
Nothing in the samplewidgets folder is included by WAB as there is a specific file .repoignore that tells WAB to ignore any file in the samplewidgets folder.