From d9c36cad82d452f978c731d91e84ecea100899bf Mon Sep 17 00:00:00 2001 From: Sercan Yemen Date: Sat, 4 Nov 2017 16:14:12 +0300 Subject: [PATCH] Fix: Angular 5 AoT issues --- package.json | 4 ++-- src/app/core/components/countdown/countdown.component.ts | 3 ++- src/app/core/services/config.service.ts | 5 ++++- .../content/apps/calendar/event-form/event-form.component.ts | 1 - .../content/apps/chat/sidenavs/left/user/user.component.ts | 1 - .../apps/contacts/contact-form/contact-form.component.ts | 1 - 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index a9374284..5be767e7 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,8 @@ "start": "ng serve", "start-hmr": "ng serve --hmr -e=hmr -sm=false", "start-hmr-sourcemaps": "ng serve --hmr -e=hmr", - "build": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build", - "build-prod": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --prod", + "build": "node --max_old_space_size=6144 ./node_modules/@angular/cli/bin/ng build --dev", + "build-prod": "node --max_old_space_size=6144 ./node_modules/@angular/cli/bin/ng build --prod", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" diff --git a/src/app/core/components/countdown/countdown.component.ts b/src/app/core/components/countdown/countdown.component.ts index 221aa227..5ab95920 100644 --- a/src/app/core/components/countdown/countdown.component.ts +++ b/src/app/core/components/countdown/countdown.component.ts @@ -1,6 +1,7 @@ import { Component, Input, OnInit } from '@angular/core'; import * as moment from 'moment'; -import { Observable } from 'rxjs/Rx'; +import { Observable } from 'rxjs/Observable'; +import 'rxjs/add/observable/interval'; @Component({ selector : 'fuse-countdown', diff --git a/src/app/core/services/config.service.ts b/src/app/core/services/config.service.ts index d0ae7c2d..045c30aa 100644 --- a/src/app/core/services/config.service.ts +++ b/src/app/core/services/config.service.ts @@ -45,6 +45,7 @@ export class FuseConfigService this.defaultSettings.customScrollbars = false; } + // Set the settings from the default settings this.settings = Object.assign({}, this.defaultSettings); // Reload the default settings on every navigation start @@ -59,7 +60,6 @@ export class FuseConfigService // Create the behavior subject this.onSettingsChanged = new BehaviorSubject(this.settings); - } /** @@ -68,7 +68,10 @@ export class FuseConfigService */ setSettings(settings) { + // Set the settings from the given object this.settings = Object.assign({}, this.settings, settings); + + // Trigger the event this.onSettingsChanged.next(this.settings); } } diff --git a/src/app/main/content/apps/calendar/event-form/event-form.component.ts b/src/app/main/content/apps/calendar/event-form/event-form.component.ts index 9dfc5240..7b9b6aa1 100644 --- a/src/app/main/content/apps/calendar/event-form/event-form.component.ts +++ b/src/app/main/content/apps/calendar/event-form/event-form.component.ts @@ -4,7 +4,6 @@ import { CalendarEvent } from 'angular-calendar'; import { FormBuilder, FormControl, FormGroup } from '@angular/forms'; import { CalendarEventModel } from '../event.model'; import { MatColors } from '../../../../../core/matColors'; -import 'rxjs/Rx'; @Component({ selector : 'fuse-calendar-event-form-dialog', diff --git a/src/app/main/content/apps/chat/sidenavs/left/user/user.component.ts b/src/app/main/content/apps/chat/sidenavs/left/user/user.component.ts index 263be716..9eaa25e2 100644 --- a/src/app/main/content/apps/chat/sidenavs/left/user/user.component.ts +++ b/src/app/main/content/apps/chat/sidenavs/left/user/user.component.ts @@ -1,7 +1,6 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { ChatService } from '../../../chat.service'; import { FormControl, FormGroup } from '@angular/forms'; -import 'rxjs/Rx'; @Component({ selector : 'fuse-chat-user-sidenav', diff --git a/src/app/main/content/apps/contacts/contact-form/contact-form.component.ts b/src/app/main/content/apps/contacts/contact-form/contact-form.component.ts index 517b3cf4..434f9c21 100644 --- a/src/app/main/content/apps/contacts/contact-form/contact-form.component.ts +++ b/src/app/main/content/apps/contacts/contact-form/contact-form.component.ts @@ -2,7 +2,6 @@ import { Component, Inject, OnInit, ViewEncapsulation } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; import { CalendarEvent } from 'angular-calendar'; import { FormBuilder, FormGroup } from '@angular/forms'; -import 'rxjs/Rx'; import { Contact } from '../contact.model'; @Component({