I want to assign an attribute of an angular service with result comes from a callaback function I have this angular service:
@Injectable()
export class SkillsManagerService {
    private skill: any;
    private event: any;
    constructor() {
        // i have an event instance
        event = getEvent ();
        this.startWatching();
    }
    //function that start watching the event
    function startWatching() {
        event.watch(function(err, res) {
            // how to assign this.skill = res ?
        }
    });
}
 
     
     
    