How to detect vue after adding routes using addRoutes () method

the following code:

this.$router.addRoutes([
  {
    path: "/temp",
    name: "Temp",
    component: () => import("@/pages/temp/Temp")
  }
])
After

has been successfully added, how can I detect the existence of Temp in the Router instance?

Mar.23,2021

// 0
let hasInstantiated = this.$router.resolve({name: 'Temp'}).route.matched.length !== 0

you can access the path corresponding to this route to see if the component is loaded properly

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b6f2-2c276.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b6f2-2c276.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?