From 2b5c083c75ac61b3a09c769fede407ceddfe6be5 Mon Sep 17 00:00:00 2001 From: Trotyl Yu Date: Wed, 6 Sep 2017 14:11:44 +0800 Subject: [PATCH] fix(module:core,root): ensure compatibility to v4 (#233) --- src/components/core/floater/floater.service.ts | 2 +- src/components/root/nz-root.component.ts | 2 +- src/components/root/nz-root.module.ts | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/core/floater/floater.service.ts b/src/components/core/floater/floater.service.ts index 401f1a028f..d4c74c43e6 100644 --- a/src/components/core/floater/floater.service.ts +++ b/src/components/core/floater/floater.service.ts @@ -7,7 +7,7 @@ import { Optional, SkipSelf } from '@angular/core'; -import { DOCUMENT } from '@angular/common'; +import { DOCUMENT } from '@angular/platform-browser'; import { ComponentType } from '@angular/cdk'; import { Floater diff --git a/src/components/root/nz-root.component.ts b/src/components/root/nz-root.component.ts index 1281f274ff..9ec732aa3a 100644 --- a/src/components/root/nz-root.component.ts +++ b/src/components/root/nz-root.component.ts @@ -5,7 +5,7 @@ import { Inject, Optional, } from '@angular/core'; -import { DOCUMENT } from '@angular/common'; +import { DOCUMENT } from '@angular/platform-browser'; import { NZ_ROOT_CONFIG, NzRootConfig, createNzRootInitializer} from './nz-root-config'; @Component({ diff --git a/src/components/root/nz-root.module.ts b/src/components/root/nz-root.module.ts index f37156ae6b..27f5c12fb8 100644 --- a/src/components/root/nz-root.module.ts +++ b/src/components/root/nz-root.module.ts @@ -1,5 +1,6 @@ import { NgModule, OnDestroy, ComponentRef, ComponentFactoryResolver, Inject, Optional, Injector, APP_INITIALIZER } from '@angular/core'; -import { CommonModule, DOCUMENT } from '@angular/common'; +import { CommonModule } from '@angular/common'; +import { DOCUMENT } from '@angular/platform-browser'; import { NzRootComponent } from './nz-root.component'; import { NzRootStyleComponent } from './nz-root-style.component'; import { NZ_ROOT_CONFIG, createNzRootInitializer } from './nz-root-config';