Skip to content

Commit 80c41a2

Browse files
authored
Activate AdminBSB input elements on AppComponentBase
1 parent 407ee14 commit 80c41a2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

angular/src/shared/app-component-base.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Injector } from '@angular/core';
1+
import { Injector, ElementRef } from '@angular/core';
22
import { AppConsts } from '@shared/AppConsts';
33
import { LocalizationService } from '@abp/localization/localization.service';
44
import { PermissionCheckerService } from '@abp/auth/permission-checker.service';
@@ -21,6 +21,7 @@ export abstract class AppComponentBase {
2121
message: MessageService;
2222
multiTenancy: AbpMultiTenancyService;
2323
appSession: AppSessionService;
24+
domNode: HTMLElement = null;
2425

2526
constructor(injector: Injector) {
2627
this.localization = injector.get(LocalizationService);
@@ -31,6 +32,11 @@ export abstract class AppComponentBase {
3132
this.message = injector.get(MessageService);
3233
this.multiTenancy = injector.get(AbpMultiTenancyService);
3334
this.appSession = injector.get(AppSessionService);
35+
this.domNode = injector.get(ElementRef).nativeElement;
36+
}
37+
38+
ngAfterViewInit(): void {
39+
($ as any).AdminBSB.input.activate($(this.domNode));
3440
}
3541

3642
l(key: string, ...args: any[]): string {
@@ -51,4 +57,4 @@ export abstract class AppComponentBase {
5157
isGranted(permissionName: string): boolean {
5258
return this.permission.isGranted(permissionName);
5359
}
54-
}
60+
}

0 commit comments

Comments
 (0)