partial

partial

  • Attributes:

    • name
  • Usage:

    <partial> elements serve as outlets for registered template partials. Partial contents are also compiled by Vue when inserted. The <partial> element itself will be replaced. It requires a name attribute which will be used to resolve the partial’s content.

  • Example:

    // registering a partial
    Vue.partial('my-partial', '<p>This is a partial! {{msg}}</p>')
    <!-- a static partial -->
    <partial name="my-partial"></partial>
    
    <!-- a dynamic partial -->
    <!-- renders partial with id === vm.partialId -->
    <partial v-bind:name="partialId"></partial>
    
    <!-- dynamic partial using v-bind shorthand -->
    <partial :name="partialId"></partial>
doc_VueJS
2016-09-25 05:48:11
Comments
Leave a Comment

Please login to continue.