Skip to content
This repository was archived by the owner on Jul 10, 2019. It is now read-only.

Commit 2edb085

Browse files
committed
feat: add example/auth/require-auth.vue
1 parent 7141f4d commit 2edb085

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<template lang="pug">
2+
section
3+
h1.title
4+
| require auth
5+
</template>
6+
7+
<script lang="ts">
8+
import { Component, Vue } from 'nuxt-property-decorator'
9+
10+
@Component({
11+
middleware: 'authenticated'
12+
})
13+
export default class RequireAuth extends Vue {
14+
public head() {
15+
return {
16+
title: 'require-auth'
17+
}
18+
}
19+
}
20+
</script>

src/pages/example/index.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
| - nuxtServerInit has been called is {{ isServerInitCalled }}
66
| - nuxtClientInit has been called is {{ isClientInitCalled }}
77
hr
8+
p
9+
nuxt-link(to='/example/auth/require-auth')
10+
| require-auth
811
p
912
nuxt-link(to='/example/ajax/color', no-prefetch)
1013
| color

0 commit comments

Comments
 (0)