How to refresh a widget in a page in service portal?

mounika58
Mega Expert

We have a refresh icon on the widget, when ever we click on the refresh icon then that particular widget should get reloaded or refreshed.

7 REPLIES 7

Hi Sneha,



Once refresh icon is clicked, call will go to below function in client controller.



$scope.refresh = function(){


  var refreshIcon = angular.element(document.getElementById("uRefresh_div"));


              refreshIcon.addClass("fa-spin");



  callrakey();//This is the function where sap call will happen



//till sap call happens below timeout should happen


$timeout(function(){


spUtil.update($scope);


alert("test");


}, 3000);



    }


Here alert is getting triggered but for data nothing is happening.


Hi Mounika,



Do you have new data to be displayed everytime ?


No same data should come but when we click on the refresh icon the data in the widget should disappear and appear