Created
November 3, 2017 16:48
-
-
Save yann-yinn/d5981f2fe38a97f571781f72e3303de1 to your computer and use it in GitHub Desktop.
get url GET params from nuxt.js asyncData method
This file contains hidden or 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
// destructuring | |
async asyncData({ route }) { | |
console.log(route); | |
} | |
// without destructuring | |
async asyncData(allParams) { | |
console.log(allParams.route); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment