December 2017
Beginner
372 pages
10h 32m
English
Adding a board involves creating a new board object, assigning it to the ID and title, and, then, adding the object to the global Boards object. Check out the following code:
public addBoard(){ console.log('Adding new board'); let newBoard:Board= new Board; newBoard.id = this.boards.length + 1 newBoard.task = Array(); newBoard.title = "New Board"; this.boards.push(newBoard); console.log('new board added'); }
Read now
Unlock full access