Solved
How to invoke the widget service programmatically using js in Thingworx Studio?
I will like to invoke the 'showpopup' service of 'Popup' widget from the js function instead of using 'click' event binding.
I will like to invoke the 'showpopup' service of 'Popup' widget from the js function instead of using 'click' event binding.
Hi,
I have found the answer by exploring $scope.app object.
The $scope.app do provide property 'fn' that includes the function called triggerWidgetService(widget_id, service_name).
The sample script for reference.
$scope.showPopup = function(){
$scope.app.fn.triggerWidgetService('popup-1','showpopup');
}
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.