Can't get current router

I want to change the color of the navigation icon based on the current route,
But I cannot get the current route in v-if


  1. get the current route


  1. Condition
    app.views.main.router.currentRoute.path == 'YOUR_PATH'

this may work !

Thank you for your help

I am using vue.js, I tried your opinion, but still cannot use

Can you give me more help?
Thanks again

  <li :class="{blue: url === '/'}">...</li>
  export default {
    data() {
      return {
        url: '',
    mounted() {
      this.$f7ready((f7) => {
        this.url = f7.views.main.router.url;
        f7.views.main.on('routeChange', (newRoute) => {
          this.url = newRoute.url;

Thanks for your help, the problem is solved,Tribute to friends of f7