Skip to content
This repository was archived by the owner on Oct 14, 2024. It is now read-only.

Commit 01caf20

Browse files
author
Miller
committed
update forRoot param
1 parent b03d406 commit 01caf20

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

projects/ng-busy/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
1.x version is used for angular 5.x
44

5-
6.x version is used for angular 6.x, and this version is **not** ready for release
5+
6.x version is used for angular 6.x
66

77
**NgBusy** can show busy/loading indicators on any promise, or on any Observable's subscription.
88

projects/ng-busy/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ng-busy",
3-
"version": "6.0.0-Alpha2",
3+
"version": "6.0.0-Alpha3",
44
"description": "Show busy/loading indicators on any promise or subscription",
55
"author": "victos",
66
"license": "MIT",
Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
import {ModuleWithProviders, NgModule} from '@angular/core';
2-
import {BusyConfig, DefaultBusyComponent} from './model/busy-config';
2+
import {BUSY_CONFIG_DEFAULTS, BusyConfig, DefaultBusyComponent, IBusyConfig} from './model/busy-config';
33
import {CommonModule} from '@angular/common';
44
import {BusyTrackerService} from './service/busy-tracker.service';
55
import {BusyConfigHolderService} from './service/busy-config-holder.service';
6-
import { NgBusyDirective } from './ng-busy.directive';
7-
import { NgBusyComponent } from './component/ng-busy/ng-busy.component';
8-
import { NgBusyBackdropComponent } from './component/ng-busy-backdrop/ng-busy-backdrop.component';
6+
import {NgBusyDirective} from './ng-busy.directive';
7+
import {NgBusyComponent} from './component/ng-busy/ng-busy.component';
8+
import {NgBusyBackdropComponent} from './component/ng-busy-backdrop/ng-busy-backdrop.component';
99

1010
@NgModule({
11-
imports: [CommonModule],
12-
declarations: [DefaultBusyComponent, NgBusyDirective, NgBusyComponent, NgBusyBackdropComponent],
13-
providers: [BusyConfigHolderService, BusyTrackerService],
14-
exports: [NgBusyDirective],
15-
entryComponents: [DefaultBusyComponent, NgBusyBackdropComponent, NgBusyComponent]
11+
imports: [CommonModule],
12+
declarations: [DefaultBusyComponent, NgBusyDirective, NgBusyComponent, NgBusyBackdropComponent],
13+
providers: [BusyConfigHolderService, BusyTrackerService],
14+
exports: [NgBusyDirective],
15+
entryComponents: [DefaultBusyComponent, NgBusyBackdropComponent, NgBusyComponent]
1616
})
1717
export class NgBusyModule {
18-
static forRoot(config: BusyConfig): ModuleWithProviders {
19-
return {
20-
ngModule: NgBusyModule,
21-
providers: [
22-
{provide: BusyConfig, useValue: config}
23-
]
24-
};
25-
}
18+
static forRoot(config: IBusyConfig): ModuleWithProviders {
19+
const conf = Object.assign(BUSY_CONFIG_DEFAULTS, config);
20+
return {
21+
ngModule: NgBusyModule,
22+
providers: [
23+
{provide: BusyConfig, useValue: conf}
24+
]
25+
};
26+
}
2627
}

0 commit comments

Comments
 (0)