Created
August 14, 2018 07:40
-
-
Save YonathanMeguira/74e5588cef4a635e730e94e15820fd8a to your computer and use it in GitHub Desktop.
main.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import './polyfills'; | |
import { enableProdMode } from '@angular/core'; | |
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | |
import { AppModule } from './app/app.module'; | |
import { enableAkitaProdMode, persistState } from '@datorama/akita'; | |
enableAkitaProdMode(); | |
persistState(); | |
export const storage = persistState(); | |
platformBrowserDynamic().bootstrapModule(AppModule).then(ref => { | |
// Ensure Angular destroys itself on hot reloads. | |
if (window['ngRef']) { | |
window['ngRef'].destroy(); | |
} | |
window['ngRef'] = ref; | |
// Otherwise, log the boot error | |
}).catch(err => console.error(err)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment