Composition
@State({
name: 'zoo',
defaults: {
type: null
}
})
@Injectable()
class ZooState {
@Action(Eat)
eat(ctx: StateContext) {
ctx.setState({ type: 'eat' });
}
}
@State({
name: 'stlzoo'
})
@Injectable()
class StLouisZooState extends ZooState {
@Action(Drink)
drink(ctx: StateContext) {
ctx.setState({ type: 'drink' });
}
}Last updated

