如何在会话中存储Http Get Request Response。并关闭我们需要删除会话的浏览器。
// Service Ajax call
this.getKpiAlertrecords = function(orgKey,orgValue,geoKey,geoValue) {
var alertUrl ='alert/v1/alerts?orgKey='+ orgKey +'&orgValue=' + orgValue +'&geoKey='+ geoKey +'&geoValue='+ geoValue;
return utilService.doGetWitHeaders(alertUrl, '', AlertuserInfo, 'SCV').then(success).catch(fail);
function success(response) {
return response.data;
}
function fail(e) {
return (e.data);
}
};
// Controller
e2eservice.getKpiAlertrecords($rootScope.HeirarchyKeyId,$rootScope.HeirarchyId,$rootScope.GeographyKeyId,$rootScope.GeographyBranchId).then(function (result) {
if (result.errors) {
$rootScope.alretCountLoader=false;
}
else {
$rootScope.alretCountLoader=false;
$scope.kpiAlertsdata = result.DISPLAY_ALERT_DETAILS;
$scope.kpialertfilterdata = [];
angular.forEach($scope.kpiAlertsdata, function (value, key) {
if (value.notificationSubject == 'DOS(+)' || value.notificationSubject == 'DOS(-)' || value.notificationSubject == 'E&O' || value.notificationSubject == 'Late Sales Orders' || value.notificationSubject == 'Late Purchase Orders' || value.notificationSubject == 'Demand' || value.notificationSubject == 'Spend' || value.notificationSubject == 'Inventory') {
$scope.kpialertfilterdata.push(value);
}
});
$rootScope.whenKpiAlersShow = false;
$scope.kpioutfun();
}
});

<div class="group-alerts" ng-repeat="kpialerts in kpialertfilterdata | filter:kpiAlertfilter">
<div class="kpialerts-top">
<div class="kpialerts-date"> {{ kpialerts.clientTimestamp | date:'MM/dd/yy' }} </div>
<div class="kpialerts-mystory-btn"> <span class="glyphicon glyphicon-option-vertical" aria-hidden="true"></span> </div>
</div>
<div class="clearfix"></div>
<div class="kpialerts-message" ng-click="kpialerttrigger(kpialerts.notificationSubject)"> {{ kpialerts.notificationSubject }} {{ kpialerts.notificationDetails | limitTo: showtexttoggle}}
<p class="showtexttoggle" ng-class="{'e2e-norecord-space': kpialerts.notificationDetails.length < 60}"> <a ng-hide="showtexttoggle> 60" ng-click="showtexttoggle=1000000">...Show more</a> <a ng-show="showtexttoggle > 60" ng-click="showtexttoggle=59">...Show less</a> </p>
</div>
</div>
&#13;