Add no-ssr example

This commit is contained in:
Sebastien Chopin 2017-08-24 12:38:53 +02:00
parent fb25c982a7
commit 222f50e139
3 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,3 @@
# Hello World with Nuxt.js
https://nuxtjs.org/examples

View File

@ -0,0 +1,11 @@
{
"name": "no-ssr-cmp-nuxt",
"dependencies": {
"nuxt": "latest"
},
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start"
}
}

17
examples/no-ssr/pages/index.vue Executable file
View File

@ -0,0 +1,17 @@
<template>
<div class="page">
<h1>Home</h1>
<no-ssr placeholder="Loading...">
<h2>This part is rendered on the client-side only</h2>
</no-ssr>
<no-ssr>
<p><code>placeholder</code> prop is optional</p>
</no-ssr>
</div>
</template>
<style scoped>
.no-ssr-placeholder {
color: #41b883;
}
</style>