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 ??
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
})
}
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.