I am attempting to change the variable "currSideNavId" inside the jQuery on() method using Angular6. The current code below gives me TS error:
[ts] Cannot find name 'currSideNavId'. [2304]
I am not sure how I can go about changing the global variable in this jQuery method. Thank you.
export class TimelineCreatorComponent implements OnInit {
currSideNavId: number;
ngOnInit (){
this.timeline.on('select', function (properties) {
console.log('selected items: ' + properties.items);
currSideNavId = properties.items;
});
}
}