app.ts

The root of all JSPA application is the base App class contained inside app.ts

When instantiated via new App()this will pull together everything in the config.ts file, set up the ServiceWorks, handle creating or upgrading the indexedDBs and then present the results to the rest off the application via the global variable app.

The config will also be made available via the global variable config

var config: Config = null; 
var app: App = null;

class App {
    constructor(){
        // set up
    }
}

The class should be instantiated at the end of the body element of index.html

<body>
    <!-- static content, eg header -->

    <!-- DOM element for holding the dinamic routed content -->
    <div class="container" style="max-width: 100%;">
        <div id="application">Loading...</div>
    </div>

    <!-- static content, eg footer -->
    <script>
        new App();
    </script>
</body>

results matching ""

    No results matching ""