You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
439 B

import { Component, OnInit } from '@angular/core';
import { TodoService } from '../todo.service'
@Component({
selector: 'app-todos-create',
templateUrl: './todos-create.component.html',
styleUrls: ['./todos-create.component.css']
})
export class TodosCreateComponent implements OnInit {
constructor(
private todoService: TodoService
) { }
create(todo){
this.todoService.addTodo(todo);
}
ngOnInit() {
}
}