Skip to content

Instantly share code, notes, and snippets.

@YonathanMeguira
Created July 15, 2018 04:56
Show Gist options
  • Save YonathanMeguira/7fcf92df7d89a5e69b12c67813753d33 to your computer and use it in GitHub Desktop.
Save YonathanMeguira/7fcf92df7d89a5e69b12c67813753d33 to your computer and use it in GitHub Desktop.
store.ts
import { Injectable } from '@angular/core';
import { EntityState, EntityStore } from '@datorama/akita';
import { List } from './shopping-list.model';
import { config } from '@datorama/akita';
export interface ListState extends EntityState<List> {}
export interface ItemState extends EntityState<List> {}
@Injectable({
providedIn: 'root'
})
@config({
name: 'list'
}
export class ListStore extends EntityStore<ListState, List> {
constructor() {
super();
}
}
@config({
name: 'item'
})
export class ItemStore extends EntityStore<ItemState, Item> {
constructor() {
super();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment