This is a migrated thread and some comments may be shown as answers.

postpone view initializations?

1 Answer 49 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 16 Oct 2013, 02:56 PM
lets say you have something like:

        <div id="tabstrip-location" 
             data-role="view"  
             data-init="app.locationService.initLocation"...

does that initialization function get called right after the app loads? as opposed to when the view is actually displayed?

is there a simple way to call initialization functions after another event has first occurred? say, after the user logs in?

1 Answer, 1 is accepted

Sort by
0
Michael
Top achievements
Rank 1
answered on 17 Oct 2013, 08:02 PM
Yes,

instead of: data-init="app.locationService.initLocation",
just call: app.locationService.initLocation(),
 whenever needed

[or whatever the initialization function in question is]
Tags
General Discussions
Asked by
Michael
Top achievements
Rank 1
Answers by
Michael
Top achievements
Rank 1
Share this question
or