Nuxt/test/fixtures/basic/plugins/page-hook-plugin.ts

9 lines
213 B
TypeScript
Raw Normal View History

2024-10-10 19:43:14 +00:00
export default defineNuxtPlugin((nuxtApp) => {
const route = useRoute()
2024-10-10 19:43:14 +00:00
nuxtApp.hook('page:loading:end', () => {
if (route.path === '/page-load-hook') {
console.log('page:loading:end')
}
2024-10-10 19:49:47 +00:00
})
})