Skip to content

Instantly share code, notes, and snippets.

@siumhossain
Created May 12, 2022 11:11
Show Gist options
  • Save siumhossain/222a5671e55fccf43397a74eccb552e5 to your computer and use it in GitHub Desktop.
Save siumhossain/222a5671e55fccf43397a74eccb552e5 to your computer and use it in GitHub Desktop.
remove underscore and 2 slash from both side dynamic url vue/Nuxt
      const route = this.$router.history.current.path
      const title = route.split('_').join(' ')
      const finalTitle = title.replace(/\\|\//g,'')
      console.log(finalTitle)
      return finalTitle;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment