CaliStyle / ng-intercom

Angular 7+ Wrapper for Intercom.com
MIT License
54 stars 46 forks source link

Attach a method or service on route change #29

Closed hassanasad closed 6 years ago

hassanasad commented 6 years ago

Is it possible to attach a method to be called from service on each route change?

For example, If i setup:

IntercomModule.forRoot({
      updateOnRouterChange: true
})

Can i bind a function to be called on each route change to manipulate intercom data to be sent?

wbhob commented 6 years ago

Yes, but this is not the place to ask.

This can help: https://stackoverflow.com/questions/42453375/how-to-call-a-function-on-every-rotute-change-in-angular2

hassanasad commented 6 years ago

Its related to intercom. I am trying to fetch some properties from API to be pushed as intercom data on each route change. Anyways, thanks for the link On Thu, Jan 18, 2018 at 3:35 AM Wilson Hobbs notifications@github.com wrote:

Closed #29 https://github.com/CaliStyle/angular2-intercom/issues/29.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/CaliStyle/angular2-intercom/issues/29#event-1429309193, or mute the thread https://github.com/notifications/unsubscribe-auth/AHOp0CziMehyn1_Hv_svHpjxc2qDHbkLks5tLnWjgaJpZM4Rhvzp .