Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@Injectable({ providedIn: 'root' })
export class UserQuery extends Query<UserState> {
constructor(protected store: UserStore) {
super(store);
}
hasFlags(flags: string | string[]): boolean {
const userFlags = this.getValue().featureFlags;
return coerceArray(flags).every(current => userFlags[current]);
}
}
@Injectable({ providedIn: 'root' })
@StoreConfig({ name: 'user' })
export class UserStore extends Store<UserState> {
constructor() {
super(createInitialState());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment