@badrap/preload
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "@badrap/preload", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Data preloading for vue-router, similar to Sapper's preload or Nuxt.js's asyncData", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -13,2 +13,4 @@ # @badrap/preload [![CircleCI](https://circleci.com/gh/badrap/preload.svg?style=shield)](https://circleci.com/gh/badrap/preload) | ||
A modified of the following examples is available at [CodeSandbox](https://codesandbox.io/s/zywnmy35x?initialpath=%23%2Ffoo). | ||
### Basic Setup | ||
@@ -22,4 +24,4 @@ | ||
import preload from "@badrap/preload"; // Import preload. | ||
import Foo from "./foo.vue"; // Import a couple of route components which | ||
import Bar from "./bar.vue"; // we decorate with preload. | ||
import Foo from "./Foo.vue"; // Import a couple of route components which | ||
import Bar from "./Bar.vue"; // we decorate with preload. | ||
@@ -36,5 +38,7 @@ Vue.use(VueRouter); | ||
}); | ||
const app = new Vue({ | ||
router | ||
}).$mount('#app') | ||
new Vue({ | ||
router, | ||
template: "<router-view />" | ||
}).$mount("#app"); | ||
``` | ||
@@ -46,9 +50,7 @@ | ||
Let's define **Foo** in **foo.vue**: | ||
Let's define **Foo** in **Foo.vue**: | ||
```vue | ||
<template> | ||
<div> | ||
{{ greeting }}, {{ ip }}! | ||
</div> | ||
<div>{{ greeting }}, {{ ip }}!</div> | ||
</template> | ||
@@ -55,0 +57,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30204
139