Skip to content

Instantly share code, notes, and snippets.

@YonathanMeguira
Created July 16, 2018 09:29
Show Gist options
  • Save YonathanMeguira/33715f4cd21c20c0c67027a393361e3b to your computer and use it in GitHub Desktop.
Save YonathanMeguira/33715f4cd21c20c0c67027a393361e3b to your computer and use it in GitHub Desktop.
query.ts
import { Injectable } from '@angular/core';
import { QueryEntity } from '@datorama/akita';
import { ListStore, ItemStore, ListState, ItemState } from './shopping-list.store';
import { List, Item } from './shopping-list.model';
@Injectable({
providedIn: 'root'
})
export class ListQuery extends QueryEntity<ListState, List> {
constructor(protected store: ListStore) {
super(store);
}
}
export class ItemQuery extends QueryEntity<ItemState, Item> {
constructor(protected store: ItemStore) {
super(store);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment