Scenario 1:
below method is from services.ts:
onChange(){
if(this.initcount == null){
this.likescount = null;
} else {
this.likescount = this.initcount;
}
}
when using it in component.ts:
constructor(service: LikesService) {
this.getchange = service.onChange; ------------------> without '()'?
}
Scenario 2: below method is from services.ts:
getArray(){
return this.courseArray;
}
when using it in component:
constructor(service: CoursesService) {
this.courses = service.getArray(); --------------------> with '()' ???
}