I am working in angularjs
and i am facing the issue onreload
of the page. When i refresh the page the object value is set as null
due to which conditions are failing in the controller.
var limitOrderReqBean = null;
obj.updateLimitOrderReq = function(limitReqBean) {
limitOrderReqBean = limitReqBean;
}
obj.getLimitOrderReqBean = function() {
return limitOrderReqBean;
}
This is the code which is used in cartservice.js
, where limitOrderReqBean
this is the object used in controller.
Initialized var limitOrderReqBean = {};
but still onrefresh
it sets as empty object.