State Actions
// todos.component.ts
import { ChangeDetectionStrategy, Component, ChangeDetectorRef } from '@angular/core';
import { ComponentState, HasStateActions } from 'ng-state';
import { TodoModel } from './../actions/todo.model';
import { TodosStateActions } from './../actions/todos.actions';
@ComponentState(TodosStateActions)
@Component({
selector: 'todos',
templateUrl: './todos.component.html',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class TodosComponent extends HasStateActions<TodosStateActions> {
constructor(cd: ChangeDetectorRef) {
super(cd);
}
}Last updated