forked from aspnet/JavaScriptServices
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboot.ts
More file actions
19 lines (16 loc) · 748 Bytes
/
boot.ts
File metadata and controls
19 lines (16 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import './css/site.css';
import * as ko from 'knockout';
import './webpack-component-loader';
import AppRootComponent from './components/app-root/app-root';
const createHistory = require('history').createBrowserHistory;
// Load and register the <app-root> component
ko.components.register('app-root', AppRootComponent);
// Tell Knockout to start up an instance of your application
ko.applyBindings({ history: createHistory() });
// Basic hot reloading support. Automatically reloads and restarts the Knockout app each time
// you modify source files. This will not preserve any application state other than the URL.
declare var module: any;
if (module.hot) {
module.hot.accept();
module.hot.dispose(() => ko.cleanNode(document.body));
}