el
-
Type:
String | HTMLElement | Function -
Restriction: only accepts type
Functionwhen used in a component definition. -
Details:
Provide the Vue instance an existing DOM element to mount on. It can be a CSS selector string, an actual HTMLElement, or a function that returns an HTMLElement. Note that the provided element merely serves as a mounting point; it will be replaced if a template is also provided, unless
replaceis set to false. The resolved element will be accessible asvm.$el.When used in
Vue.extend, a function must be provided so each instance gets a separately created element.If this option is available at instantiation, the instance will immediately enter compilation; otherwise, the user will have to explicitly call
vm.$mount()to manually start the compilation. -
See also: Lifecycle Diagram
Please login to continue.