You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ombi/src/Ombi/ClientApp/src/app/state/customization/customization.facade.ts

18 lines
656 B

import { CustomizationSelectors } from "./customization.selectors";
import { ICustomizationSettings } from "../../interfaces";
import { Injectable } from "@angular/core";
import { LoadSettings } from "./customization.actions";
import { Observable } from "rxjs";
import { Store } from "@ngxs/store";
@Injectable({
providedIn: 'root',
})
export class CustomizationFacade {
public constructor(private store: Store) {}
public settings$ = (): Observable<ICustomizationSettings> => this.store.select(CustomizationSelectors.customizationSettings);
public loadCustomziationSettings = (): Observable<unknown> => this.store.dispatch(new LoadSettings());
}