tag:blogger.com,1999:blog-9014730285386259823.post3752538930975524444..comments2024-03-04T14:41:53.519+05:30Comments on Prasanna Kumar Pattam: Session and Profile in Knockout Durandal SPAPrasanna Kumar Pattamhttp://www.blogger.com/profile/05306189308152061408noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-9014730285386259823.post-59377250807568904132015-11-19T03:40:11.224+05:302015-11-19T03:40:11.224+05:30you definitely don't need to set the session o...you definitely don't need to set the session object global nor any other variable, in Durandal you can make use of Singleton for anything that need to be passed around in the application.Crisim il Numenoreanohttps://www.blogger.com/profile/15420551464567919215noreply@blogger.comtag:blogger.com,1999:blog-9014730285386259823.post-23573750179947481212015-02-10T21:14:07.099+05:302015-02-10T21:14:07.099+05:30You can store the data on to the window object. In...You can store the data on to the window object. In my scenario I am storing session data in the window object <br />window.session = session;<br /><br />In my scenario, I put all the data I want global scope in the session function. Please take a look at the entire code of this session function<br />https://github.com/prasannapattam/epos/blob/master/epos/epos/App/services/session.js<br /><br />On my application start page I am assigning this session on to the window object in addition to other objects I need global scope. Here is this code:<br />https://github.com/prasannapattam/epos/blob/master/epos/epos/App/viewmodels/shell.js<br /><br />Finally the entire code is on the GitHub, you can download and check it out<br />https://github.com/prasannapattam/epos/tree/master/epos/eposPrasanna Kumar Pattamhttps://www.blogger.com/profile/05306189308152061408noreply@blogger.comtag:blogger.com,1999:blog-9014730285386259823.post-70795429899295771182015-02-10T17:25:13.634+05:302015-02-10T17:25:13.634+05:30Can you please give some details about how to get ...Can you please give some details about how to get this session (global variable) on any view. This is very critical issue in SAP. Because we always have some variables that we need application wide. We do not want to make call to database to these on every view. What is the proper solution for that.070400704https://www.blogger.com/profile/06155179984680015060noreply@blogger.com