mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-09 02:54:13 +00:00
Added bootstrap with ng-bootstrap
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user