alexjoverm / alexjoverm/v-runtime-template

Using v-runtime-template within a slot

Open
#63 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
601
Forks
71
PR merge metrics
No merged PRs in 30d

Description

Just documenting this here as it took me awhile to solve this as it was not documented. Solved by code inspection.

If you want to pass some other props into the v-runtime-template's component, you can use

```ts
data: () => ({
template: `

{{parentProp1}} {{prop}}
`,
}),
```

```vue

```

This seems to be required if you

- trying to access v-for variables
- using v-runtime-template within a slot, limiting you to parent component props, not slot scope

Hope this saves people some time in the future.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.