This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Launch Program", | |
"program": "${workspaceFolder}/index.js", | |
"preLaunchTask": "tsc: build - tsconfig.json", | |
"outFiles": [ | |
"${workspaceFolder}/dist/**/*.js" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"preserveConstEnums": true, | |
"strictNullChecks": true, | |
"declaration": true, | |
"module": "commonjs", | |
"moduleResolution": "node", | |
"pretty": true, | |
"sourceMap": true, | |
"target": "es6", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onDeleteGoalEvent($event:any) { | |
this.goalService.remove(this.goal); | |
this.onTapped($event); // Call this to hide the goal editor | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onDeleteEvent() { | |
this.goalService.remove(this.goalItem); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
remove(goal: Goal): Promise<void> { | |
let index:number = GOALS.indexOf(goal); | |
if (index > -1) { | |
GOALS.splice(index, 1); | |
} | |
return Promise.resolve(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onCopyGoalEvent() { | |
this.goalService.clone(this.goal).then(goal => this.goal = goal) ; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onCopyEvent() { | |
this.goalService.clone(this.goalItem); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clone(goal: Goal): Promise<Goal> { | |
let clonedObject:Goal = goal.clone(); | |
GOALS.push(clonedObject); | |
return Promise.resolve(clonedObject); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clone():Task { | |
return new Task({ | |
title: this.title, | |
completed:this.completed, | |
percent:this.percent, | |
dueDate:this.dueDate, | |
completedAt:this.completedAt, | |
belongsTo:this.belongsTo, | |
showPercentage: this.showPercentage | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clone():TaskCollection { | |
let cloneObject:TaskCollection = new TaskCollection(); | |
for (let i=0; i<this.length; i++) { | |
let task:Task = this[i]; | |
let cloneTask:Task = task.clone(); | |
cloneObject.push(cloneTask); | |
} | |
return cloneObject; |
NewerOlder