Skip to content

Commit 68ec357

Browse files
committed
refactor(hotkeys): move to core subfolder
1 parent 1ac29c4 commit 68ec357

File tree

5 files changed

+4
-5
lines changed

5 files changed

+4
-5
lines changed

src/app/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ import { ChatsComponent } from './chats/chats.component';
3232
import { ComponentsModule } from './components/components.module';
3333
import { DashboardComponent } from './dashboard/dashboard.component';
3434
import { DialogsModule } from './dialogs/dialogs.module';
35-
import { HotkeysModule } from './hotkeys/hotkeys.module';
3635
import { LoginComponent } from './login/login.component';
36+
import { HotkeysModule } from './core/hotkeys/hotkeys.module';
3737
import { MaterialModule } from './material.module';
3838
import { SharedModule } from './shared.service';
3939
import { CustomFormlyModule } from './shared/formly/custom-formly.module';

src/app/hotkeys/hotkeys.module.ts renamed to src/app/core/hotkeys/hotkeys.module.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
3-
import { HotkeysService } from './hotkeys.service';
43
import { MatDialogModule } from '@angular/material/dialog';
54
import { MatButtonModule } from '@angular/material/button';
65
import { HotkeyHelpDialogComponent } from './hotkey-help-dialog/hotkey-help-dialog.component';
@@ -12,7 +11,6 @@ import { HotkeyHelpDialogComponent } from './hotkey-help-dialog/hotkey-help-dial
1211
MatButtonModule,
1312
MatDialogModule
1413
],
15-
providers: [HotkeysService],
1614
entryComponents: [HotkeyHelpDialogComponent],
1715
exports: [HotkeyHelpDialogComponent]
1816
})

src/app/hotkeys/hotkeys.service.ts renamed to src/app/core/hotkeys/hotkeys.service.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { EventManager } from '@angular/platform-browser';
66
import { DOCUMENT } from '@angular/common';
77
import { MatDialog } from '@angular/material/dialog';
88
import { HotkeyHelpDialogComponent } from './hotkey-help-dialog/hotkey-help-dialog.component';
9+
import { HotkeysModule } from './hotkeys.module';
910

1011
interface HotkeyOptions {
1112
/** The element to bind the hotkey to. */
@@ -29,12 +30,12 @@ interface HotkeyOptions {
2930
}
3031

3132
@Injectable({
32-
providedIn: 'root'
33+
providedIn: HotkeysModule
3334
})
3435
export class HotkeysService {
3536
hotkeys = new Map<string, string>();
3637
readonly hotkeyHelpDialogId = 'hotkey-help-dialog';
37-
defaults: Partial<HotkeyOptions> = {
38+
readonly defaults: Partial<HotkeyOptions> = {
3839
element: this.document
3940
};
4041

0 commit comments

Comments
 (0)