[Vuejs]-How to use v-if to to return true if route ends in number

0👍

You could use regex match:

<div v-if="$router.currentRoute.path.match(/reporter\/\d+/)">

(depending on how you get the current route as a string)

0👍

There’s a javascript function isNaN

Leave a comment