Created
January 30, 2016 04:19
-
-
Save SirajGadhia/0064b2e94d9e0cd9aeb6 to your computer and use it in GitHub Desktop.
This file contains 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
//http://www.siraj360.com/ng2/ :: A single page application developed with Angular 2 (beta) and Bootstrap 4 (alpha). | |
import { Component, Input } from 'angular2/core'; | |
import { CORE_DIRECTIVES } from 'angular2/common'; | |
import { RouterLink } from 'angular2/router'; | |
@Component({ | |
selector: 'employee', | |
templateUrl: 'app/components/employee/employee.component.html', | |
directives: [CORE_DIRECTIVES, RouterLink] | |
}) | |
export class EmployeeComponent { | |
@Input() employee: any; | |
@Input('sr-no') srNo: number; | |
changeComplete(Course: any) { | |
//debugger; | |
Course.isComplete = !Course.isComplete; | |
this.employee.isAllPending = true; | |
this.employee.isAllCompleted = true; | |
for (var i = 0; i < this.employee.EmployeeCourses.length; i++) { | |
if (this.employee.EmployeeCourses[i].isComplete) { | |
this.employee.isAllPending = false; | |
} else { | |
this.employee.isAllCompleted = false; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment