You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 26, 2018. It is now read-only.
I am having a huge component now at 7-800 lines and I would very much like to split it to different files. My biggest part of the component is the template section and I would therefor like to know if it's possible to include parts from other files? I have seen that you can do a <template src="file.html"></template> but only if it's at the root level.
Is there an option when I want to do it in the middle of my template section?
The text was updated successfully, but these errors were encountered:
Fwiw I usually split heavy templates into separate components, just pass required stuff there as prop.
Oftentimes this leads to a better separation of concerns (e.g. props, computed and methods are nautrally split between sub-components and almost never shared). However, in rare cases you can also pass this as a prop to child component — this way child will have a direct access to parent.
Thanks, but.. I wish I could, but maybe I just don't understand some logic. It's a component with sub components so everything screws up when I separeate those subs, maybe because the sub has a callback once completed.
I tried a few things out but I didn't succeed and I think reasonable time has run out :-(
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am having a huge component now at 7-800 lines and I would very much like to split it to different files. My biggest part of the component is the template section and I would therefor like to know if it's possible to include parts from other files? I have seen that you can do a
<template src="file.html"></template>
but only if it's at the root level.Is there an option when I want to do it in the middle of my template section?
The text was updated successfully, but these errors were encountered: