Last active
April 7, 2018 06:07
-
-
Save nomanHasan/75fbb0bdb01d5ac9bc84a6ff17e4c943 to your computer and use it in GitHub Desktop.
#todoapp-angular-ngrx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Todo from '../../models/todo.model'; | |
export interface TodoState extends Todo{ | |
loading:boolean; | |
editable: boolean; | |
edited: boolean; | |
editing:boolean; | |
selected: boolean; | |
refreshing:boolean; | |
create: boolean; | |
error: boolean; | |
} | |
export const initializeTodoState = function() { | |
return { | |
loading: false, | |
editable: true, | |
edited: false, | |
editing:false, | |
selected: false, | |
refreshing:false, | |
create: true, | |
error: false, | |
} | |
} | |
export interface TodoListState{ | |
todos: TodoState[]; | |
loading: boolean; | |
pending: number; | |
} | |
export const intializeTodoListState = function(){ | |
return { | |
loading: false, | |
pending: 0, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment