Skip to content

Commit

Permalink
fix(module:fesm2015): fix fesm2015 build error (#3015)
Browse files Browse the repository at this point in the history
  • Loading branch information
vthinkxie authored Mar 4, 2019
1 parent 050faa0 commit e5b388a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 45 deletions.
41 changes: 0 additions & 41 deletions components/core/util/nz-global-monitor.ts

This file was deleted.

1 change: 0 additions & 1 deletion components/core/util/public-api.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export * from './check';
export * from './convert';
export * from './getMentions';
export * from './nz-global-monitor';
export * from './string';
export * from './textarea-caret-position';
export * from './throttleByAnimationFrame';
Expand Down
7 changes: 4 additions & 3 deletions components/i18n/date-helper.service.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { DatePipe } from '@angular/common';
import { Inject, Injectable, Optional } from '@angular/core';
import { Inject, Injectable, Injector, Optional } from '@angular/core';
import fnsFormat from 'date-fns/format';
import fnsGetISOWeek from 'date-fns/get_iso_week';
import fnsParse from 'date-fns/parse';
import { mergeDateConfig, NzDateConfig, NZ_DATE_CONFIG } from './date-config';
import { NzI18nService } from './nz-i18n.service';

export function DATE_HELPER_SERVICE_FACTORY(i18n: NzI18nService, config: NzDateConfig, datePipe: DatePipe): DateHelperService {
export function DATE_HELPER_SERVICE_FACTORY(injector: Injector, config: NzDateConfig, datePipe: DatePipe): DateHelperService {
const i18n = injector.get(NzI18nService);
return i18n.getDateLocale() ? new DateHelperByDateFns(i18n, config) : new DateHelperByDatePipe(i18n, config, datePipe);
}

Expand All @@ -17,7 +18,7 @@ export function DATE_HELPER_SERVICE_FACTORY(i18n: NzI18nService, config: NzDateC
@Injectable({
providedIn: 'root',
useFactory: DATE_HELPER_SERVICE_FACTORY,
deps: [ NzI18nService, [ new Optional(), NZ_DATE_CONFIG ], DatePipe ]
deps: [ Injector, [ new Optional(), NZ_DATE_CONFIG ], DatePipe ]
})
export abstract class DateHelperService {
relyOnDatePipe: boolean = this instanceof DateHelperByDatePipe; // Indicate whether this service is rely on DatePipe
Expand Down

0 comments on commit e5b388a

Please sign in to comment.