Nuxt/test/fixtures/basic/plugins/page-hook-plugin.ts
2024-10-11 14:16:39 +01:00

9 lines
213 B
TypeScript

export default defineNuxtPlugin((nuxtApp) => {
const route = useRoute()
nuxtApp.hook('page:loading:end', () => {
if (route.path === '/page-load-hook') {
console.log('page:loading:end')
}
})
})