# useNavigationPathInfo
You can generate routeData
manually for a specific entity. Most of the time, this usage is not recommended.
# Example usage
<script>
import { onMounted } from '@vue/composition-api'
import { useNavigationPath, useNavigationPathInfo } from '@jdi/vue-backoffice-library'
export default {
setup(_, { root: { $store, $route } }) {
const { routeData: userRouteData } = useNavigationPathInfo('users')
const { setupNavigationPath } = useNavigationPath($store, $route)
onMounted(() => {
// In this case, the payload is empty, then we use the automatically generated `payload`
setupNavigationPath([userRouteData])
})
}
}
</script>
Note
The entity must be inside the $route
-object, otherwise the information is not generated and hasRouteData
will be false
.