Now, let's finish off our application by adding the Board component. Our Board component will just have one function to be able to display the Task and SubTask for the Board selected.
So, the code for the BoardComponent is fairly simple: we fetch the board ID based on the routing information, and then show the details of the Board on the screen. The code is as follows:
@Component({
selector: 'app-board',
templateUrl: './board/board.component.html',
styleUrls: ['./board/board.component.css']
})
export class BoardComponent implements OnInit {
board: Board = new Board;
boardId: number;
constructor(private _route: ActivatedRoute, private _trelloService: TrelloService) { }
ngOnInit() {
this._route.params.subscribe((params) => {
this.boardId = params["id"];
});
console.log(this.boardId);
this.board = this...