getByType
export class TasksComponent implements OnInit {
model: any = {};
type: any;
id: number;
constructor(
private taskService: TaskService,
private router: Router
) {}
ngOnInit() {
this.type = this.taskService.getByType(this.id).subscribe((type) => {
this.type = type;
});
}
}