Last active
March 27, 2020 15:29
-
-
Save mercs600/29da013fb965fa66a8578aa2c0c9595f to your computer and use it in GitHub Desktop.
nuxt-ssr-excercise-1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<h1> {{ title }} </h1> | |
<p> Just check HTML source or inspect window.__NUXT__ </p> | |
</div> | |
</template> | |
<script> | |
export default { | |
asyncData (context) { | |
// will be merged with data object, | |
// so you can use {{ title }} | |
return { title: 'async data' } | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment