parent
eb4b5b39ce
commit
ed3da7c9f4
@ -0,0 +1,17 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
const FAKETODOS = [
|
||||
'make bed',
|
||||
'eat',
|
||||
'drink'
|
||||
]
|
||||
|
||||
@Injectable()
|
||||
export class TodoService {
|
||||
getTodos(){
|
||||
return FAKETODOS;
|
||||
}
|
||||
addTodo(todo){
|
||||
FAKETODOS.push(todo);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue