diff --git a/npm/ng-packs/packages/account/src/lib/components/auth-wrapper/auth-wrapper.component.ts b/npm/ng-packs/packages/account/src/lib/components/auth-wrapper/auth-wrapper.component.ts
index aadbbfa656..0552d88f26 100644
--- a/npm/ng-packs/packages/account/src/lib/components/auth-wrapper/auth-wrapper.component.ts
+++ b/npm/ng-packs/packages/account/src/lib/components/auth-wrapper/auth-wrapper.component.ts
@@ -1,6 +1,6 @@
-import { Component, Input, TemplateRef } from '@angular/core';
+import { Component, Input, TemplateRef, OnInit, OnDestroy } from '@angular/core';
import { Account } from '../../models/account';
-import { Select } from '@ngxs/store';
+import { Select, Store } from '@ngxs/store';
import { ConfigState } from '@abp/ng.core';
import { Observable } from 'rxjs';
@@ -10,13 +10,28 @@ import { Observable } from 'rxjs';
exportAs: 'abpAuthWrapper',
})
export class AuthWrapperComponent
- implements Account.AuthWrapperComponentInputs, Account.AuthWrapperComponentOutputs {
- @Select(ConfigState.getSetting('Abp.Account.EnableLocalLogin'))
- enableLocalLogin$: Observable<'True' | 'False'>;
-
+ implements
+ Account.AuthWrapperComponentInputs,
+ Account.AuthWrapperComponentOutputs,
+ OnInit,
+ OnDestroy {
@Input()
readonly mainContentRef: TemplateRef
;
@Input()
readonly cancelContentRef: TemplateRef;
+
+ enableLocalLogin = true;
+
+ constructor(private store: Store) {}
+
+ ngOnInit() {
+ this.store.select(ConfigState.getSetting('Abp.Account.EnableLocalLogin')).subscribe(value => {
+ if (value) {
+ this.enableLocalLogin = value.toLowerCase() !== 'false';
+ }
+ });
+ }
+
+ ngOnDestroy() {}
}