V7.8 : On route any common function

v7.8: On route any common function

Is there any common function on every route change?
For example
if I am in the home page, if I navigate to the dashboard or visualize page I want to call a function before navigation

Any function ??

Hi @vvvprabhakar,

I think you are after the core.application.currentAppId$ observable. In your public/plugin.ts file, your start method can look something like:

public start({ application }: CoreStart) {
  application.currentAppId$.subscribe((appId) => {
    // Callback triggered for every application change
1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.