Created
October 20, 2018 03:17
-
-
Save InfoSec812/5b96c694b3ebcb6a73c613c809550cff to your computer and use it in GitHub Desktop.
Add a REST library as a global property on the Vue object
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
| import Vue from "vue"; | |
| import App from "./App.vue"; | |
| import router from "./router"; | |
| import "./registerServiceWorker"; | |
| import "./styles/quasar.styl"; | |
| import "quasar-framework/dist/quasar.ie.polyfills"; | |
| import iconSet from "quasar-framework/icons/fontawesome"; | |
| import "quasar-extras/fontawesome"; | |
| import Quasar from "quasar"; | |
| // Just pretend we imported an API client or Axios or something | |
| const myApiClient = {}; | |
| // Assign our API client to the Vue class as $api | |
| Vue.prototype.$api = myApiClient; | |
| Vue.use(Quasar, { | |
| config: {}, | |
| iconSet: iconSet | |
| }); | |
| Vue.config.productionTip = false; | |
| new Vue({ | |
| router, | |
| render: h => h(App) | |
| }).$mount("#app"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment