template
-
Type:
String
-
Details:
A string template to be used as the markup for the Vue instance. By default, the template will replace the mounted element. When the
replace
option is set tofalse
, the template will be inserted into the mounted element instead. In both cases, any existing markup inside the mounted element will be ignored, unless content distribution slots are present in the template.If the string starts with
#
it will be used as a querySelector and use the selected element’s innerHTML as the template string. This allows the use of the common<script type="x-template">
trick to include templates.Note that under certain situations, for example when the template contains more than one top-level element, or contains only plain text, the instance will become a fragment instance - i.e. one that manages a list of nodes rather than a single node. Non flow-control directives on the mount point for fragment instances are ignored.
-
See also:
Please login to continue.