DEV Community

Noncio
Noncio

Posted on

How to import or use js file configuration into any vue page in your nuxt app

hello

i have a nuxtjs project of listing booking

I have done all my API calls and configurations on " index.js in the store folder " and would like to display the listing data  gotten from the API call on my "listing.vue page " please how do I call do to print my data gotten or make my index.js accessable all over the app 

app setup

{
"name": "lisngbook,,
"version": "1.0.0",
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate"
  },
"dependencies": {
"@nuxtjs/axios": "^5.13.6",
"core-js": "^3.9.1",
"nuxt": "^2.15.3",
  },
"devDependencies": {
"@nuxtjs/moment": "^1.6.1"
  },
Enter fullscreen mode Exit fullscreen mode


Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
kissu profile image
Konstantin BIFERT

After an email discussion, OP created a question on SO: stackoverflow.com/q/74901981/8816585

If more people are interested into helping, you can join here.