Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions projects/angular-l10n/src/lib/modules/l10n-intl.module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NgModule } from '@angular/core';
import { ModuleWithProviders, NgModule } from '@angular/core';

import { L10nDatePipe, L10nDateAsyncPipe } from '../pipes/l10n-date.pipe';
import { L10nNumberPipe, L10nNumberAsyncPipe } from '../pipes/l10n-number.pipe';
Expand Down Expand Up @@ -47,6 +47,14 @@ import { L10nIntlService } from '../services/l10n-intl.service';
L10nPluralDirective,
L10nDisplayNamesDirective
],
providers: [L10nIntlService]
})
export class L10nIntlModule { }
export class L10nIntlModule {

public static forRoot(): ModuleWithProviders<L10nIntlModule> {
return {
ngModule: L10nIntlModule,
providers: [L10nIntlService]
};
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('L10nDateDirective', () => {
declarations: [MockComponent],
imports: [
L10nTranslationModule.forRoot(config),
L10nIntlModule
L10nIntlModule.forRoot()
]
}).createComponent(MockComponent);
comp = fixture.componentInstance;
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-l10n/src/tests/l10n-intl.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('L10nIntlService', () => {
TestBed.configureTestingModule({
imports: [
L10nTranslationModule.forRoot(config),
L10nIntlModule
L10nIntlModule.forRoot()
]
});
loader = TestBed.inject(L10nLoader);
Expand Down