Skip to main content

Module load order

Comments

1 comment

  • Marc Rempel

    I think I have solved my problem.  I watched the Deep Dive video http://support.geocortex.com/guc-2013-d1-tt-s3

    Toward the end it showed how to add a site initialzed check to the ViewModel.ts file.  It will check if the site has been initialized and if not subscribe to the SiteInitializedEvent.

    initialize(config: any): void {

     

                var site: geocortex.essentials.Site = (<any>this).app.site;

                if (site && site.isInitialized) {

     

                    this._onSiteInitialized(site);

     

                }

     

                else {

     

                    this.app.eventRegistry.event("SiteInitializedEvent").subscribe(this, (args) => {

     

                        this._onSiteInitialized(args);

     

                    });

     

                }                  }

            _onSiteInitialized(site: geocortex.essentials.Site) {

            MODULE CODE GOES HERE

    }

    Hope that helps someone else down the line.

    Marc

    0

Please sign in to leave a comment.