2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-20 07:40:35 +03:00

docs: update docs with new features (#416)

This commit is contained in:
Pim
2019-07-24 16:06:50 +02:00
committed by GitHub
parent 253108afac
commit 8f441899ef
8 changed files with 264 additions and 28 deletions
+10
View File
@@ -0,0 +1,10 @@
# How to chain metaInfo which are depending on each other
Since v2.1 you can add a [callback attribute](/api/#callback-since-v2-1) to your metaInfo proerties which you can use to chain loading.
If you e.g. need to load an external script before you can implement functionality based on that external script, you can use the [callback](/api/#callback-since-v2-1) and [skip](/api/#skip-since-v2-1) attributes to implement chaining of those scripts. See the API entry of the callback attribute for an [example](/api/#callback-since-v2-1)
::: tip
The callback / onload event is supported on `link`, `style` and `script` metaInfo properties
:::
+9 -3
View File
@@ -1,9 +1,15 @@
# How to prevent update on page load
Add the `data-vue-meta-server-rendered` attribute to the `<html>` tag on the server-side:
In your template call the text method of `htmlAttrs` with `true` as first argument:
```
<html {{ htmlAttrs.text(true) }}>
...
```
```html
<html data-vue-meta-server-rendered>
Or manually add the [`data-vue-meta-server-rendered`](/api/#ssrattribute) attribute to the `<html>` tag on the server-side:
```
<html data-vue-meta-server-rendered <%= meta.htmlAttrs.text() %>>
...
```