limitBy

limitBy

  • Limited to: directives that expect Array values, e.g. v-for

  • Arguments:

    • {Number} limit
    • {Number} [offset]
  • Usage:

    Limit the array to the first N items, as specified by the argument. An optional second argument can be provided to set a starting offset.

    <!-- only display first 10 items -->
    <div v-for="item in items | limitBy 10"></div>
    
    <!-- display items 5 to 15 -->
    <div v-for="item in items | limitBy 10 5"></div>
doc_VueJS
2016-09-25 05:48:09
Comments
Leave a Comment

Please login to continue.