Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

How to set values to variables of catalog items embedded in spModal

Ro5
Tera Expert

Hello.
I created a gimmick that uses spModal to display catalog items when a button is clicked.
I want to set values to some variables of catalog items displayed with spModal, but how can I do that?
Below is the button script.

 

HTML:
<div class="panel-body">
<button ng-click="c.onWidget('widget-sc-cat-item-v2')" class="btn btn-primary post-btn ng-scope">reopen</button>
</div>

Client controller:
api.controller=function($scope, spModal) {
/* widget controller */
var c = this;
c.onWidget = function(widgetId, widgetInput) {
spModal.open({
title: 'Displaying widget' + widgetId,
   backdrop: 'static',
widget: widgetId,
widgetInput: widgetInput || {
sys_id: "401d4005c392b150f4fcf6977a0131af",
},
 size: 'lg',
 scope: $scope
}).then(function(){
console.log('widget dismissed');
})
}
};

Regards,
Ro

1 REPLY 1

chitra11
Tera Contributor

Hi, Did you get how to achieve this. We also need the same.