mirror of
https://github.com/simon987/task_tracker.git
synced 2025-12-13 23:09:02 +00:00
Task chaining + some refactoring
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
|
||||
import {ApiService} from "../api.service";
|
||||
import {Project} from "../models/project";
|
||||
|
||||
@Component({
|
||||
selector: 'project-select',
|
||||
templateUrl: './project-select.component.html',
|
||||
styleUrls: ['./project-select.component.css']
|
||||
})
|
||||
export class ProjectSelectComponent implements OnInit {
|
||||
|
||||
projectList: Project[];
|
||||
|
||||
@Input() project: Project;
|
||||
@Output() projectChange = new EventEmitter<Project>();
|
||||
|
||||
constructor(private apiService: ApiService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
loadProjectList() {
|
||||
this.apiService.getProjects().subscribe(data => {
|
||||
this.projectList = data["projects"]
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user