So I'm pretty new to WebApp builder developer edition. I'm just trying to do a simple task to list the layer in the console log by clicking the button inside the widget.
This is what I have so far. it keeps saying "Uncaught TypeError: LayerInfos.getInstance is not a function" So I'm pretty sure it can't find 'jimu/LayerInfos/LayerInfos'. Also VisualStudioCode greys out the LayersInfos on line 8 when decalring the functions.
I'm using the xyz:3344/webappviewer/?config=sample-configs/config-demo.json to develop the app.
Could anyone help guide me. I think I'm missing something fundamental here.
Thanks,
<SPAN class="token function">define</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="string token">'dojo/_base/declare'</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">'jimu/BaseWidget'</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">'jimu/LayerInfos/LayerInfos'</SPAN>
<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="keyword token">function</SPAN><SPAN class="punctuation token">(</SPAN>declare<SPAN class="punctuation token">,</SPAN> BaseWidget<SPAN class="punctuation token">,</SPAN> LayerInfos<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="comment token">//LayerInfos gets greyed out in Microsoft Visual Studio</SPAN>
<SPAN class="keyword token">var</SPAN> clazz <SPAN class="operator token">=</SPAN> <SPAN class="token function">declare</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">[</SPAN>BaseWidget<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="punctuation token">{</SPAN>
templateString<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">'<div>This is adamsWidget!. '</SPAN> <SPAN class="operator token">+</SPAN>
<SPAN class="string token">'<input type="button" value="Get Map Id"