Skip to content

Commit 5a95a43

Browse files
committed
refactor(dropdown.service): cleanup
1 parent e484583 commit 5a95a43

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

projects/coreui-angular/src/lib/dropdown/dropdown.service.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ export interface IDropdownState {
66
dropdown?: any;
77
}
88

9-
@Injectable()
9+
@Injectable({
10+
providedIn: 'root'
11+
})
1012
export class DropdownService {
11-
12-
private dropdownState = new BehaviorSubject<any>({});
13-
dropdownState$ = this.dropdownState.asObservable();
13+
readonly #dropdownState = new BehaviorSubject<any>({});
14+
readonly dropdownState$ = this.#dropdownState.asObservable();
1415

1516
toggle(state: IDropdownState): void {
16-
this.dropdownState.next(state);
17+
this.#dropdownState.next(state);
1718
}
1819
}

0 commit comments

Comments
 (0)