How to set values to variables of catalog items embedded in spModal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2023 11:00 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2024 08:22 PM
Hi, Did you get how to achieve this. We also need the same.