search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

How to routing on onEventClicked: function (args) { } ANGULAR

Asked by Kar
2 months ago.

I want go to page using event clicked function, but innested function not working

Answer posted by Dan Letecky [DayPilot]
2 months ago.

Try using the TypeScript syntax:

constructor(private router: Router) { }
config: any = {
  onEventClicked: args => {
    this.router.navigate(.....);
  }
}

When using the JavaScript syntax "this" points to DayPilot.Scheduler instance instead of your component:

config: any = {
  onEventClicked: function(args) {
    // this === DayPilot.Scheduler instance
  }
}
Comment posted by Kar
2 months ago.

Thanks a lot

New Reply
This reply is
Your name (optional):