How to pass widget options data while calling another widget from another widget

Boopal Karthick
Tera Contributor

Hi,

I'm having 2 widgets ( widget1 and widget2 ).

widget2 has widget option to display some values.
I'm trying to call widget2 from widget1.

but always the loaded the component loaded with default value.

Please help me how to solve this problem. 

 


spUtil.get($scope.currentComponent.ComponenetID, JSON.stringify($scope.currentComponent.ComponentOptions)).then(function(response) {
c.currentComponent = response;
});

 

 

Thanks.

1 REPLY 1

T_Fesenko
Tera Contributor

Hi @Boopal Karthick , please look here: Embedded widgets (servicenow.com)

This example in particular should be helpful:

 <widget id="widget-cool-clock" options='{"zone": "America/Los_Angeles","title": "San Diego, CA"}'></widget>

Best, 

Tym