I currently have a few widgets in my config.json file that I would like to start out as not visible, so I am setting the "visible" property to false. I have another widget that will be sending a request and depending on the response from the request, I want to turn on the visibility of some of the widgets. This is what I currently have:
var widgetManager = WidgetManager.getInstance();
widgetManager.appConfig.widgetOnScreen.widgets[6].visible = true;
widgetManager.loadWidget(widgetManager.appConfig.widgetOnScreen.widgets[6]).then(lang.hitch(this, function(widget){
console.log(widget);
}));
The console log I have shows that the visible property is set to true (widget { visible:true }), but the widget is not visible in the application. Can anyone help with this?
Thanks,
Jamie