el

el

  • Type: String | HTMLElement | Function

  • Restriction: only accepts type Function when 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 replace is set to false. The resolved element will be accessible as vm.$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

doc_VueJS
2016-09-25 05:48:06
Comments
Leave a Comment

Please login to continue.