Added bootstrap with ng-bootstrap

This commit is contained in:
William Welling
2016-12-01 13:49:24 -06:00
parent 28e23f0cdd
commit b56fc730c5
20 changed files with 175 additions and 50 deletions

View File

@@ -3,6 +3,8 @@ import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { UniversalModule, isBrowser, isNode } from 'angular2-universal/node'; // for AoT we need to manually split universal packages
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { AppModule, AppComponent } from './app/app.module';
import { SharedModule } from './app/shared/shared.module';
import { CacheService } from './app/shared/cache.service';
@@ -25,9 +27,10 @@ export function getResponse() {
export const UNIVERSAL_KEY = 'UNIVERSAL_CACHE';
@NgModule({
bootstrap: [ AppComponent ],
bootstrap: [AppComponent],
imports: [
// MaterialModule.forRoot() should be included first
NgbModule.forRoot(),
UniversalModule, // BrowserModule, HttpModule, and JsonpModule are included
FormsModule,
@@ -63,9 +66,9 @@ export class MainModule {
universalCache[CacheService.KEY] = JSON.stringify(this.cache.dehydrate());
}
/**
* Clear the cache after it's rendered
*/
/**
* Clear the cache after it's rendered
*/
universalAfterDehydrate = () => {
// comment out if LRU provided at platform level to be shared between each user
this.cache.clear();