December 2017
Beginner
372 pages
10h 32m
English
Create a new file, trello.service.ts, in the services folder with the following code:
Injectable()export class TrelloService { public Boards: Board[]; constructor() {} public seedData(){ let temptask: Task = new Task(); let tempSubTask:SubTask = new SubTask(); let board:Board= new Board(); temptask.id = 1; temptask.title = "Hello Task!!"; temptask.taskheaderId = "1"; tempSubTask.id="1"; tempSubTask.title = "Hello Task Header!!"; temptask.subtask = Array(); temptask.subtask.push(tempSubTask); board.id=1; board.title = "Hello Seed Board"; board.task = new Array(); board.task.push(temptask); this.Boards = new Array(); this.Boards.push(board); return board; }}
Here, we create a TrelloService class module, which has one method, ...
Read now
Unlock full access