Chinese Documentation : Limit(返回结果数限制)过滤器

Limit 过滤器限制返回的纪录条数。

Icon

Methods of models in the AngularJS client have a different signature than those of the Node API. For more information, see AngularJS SDK API.

REST API

filter[limit]=n
可以使用 stringified JSON format 做为REST query.

Node API

{limit: n}

这里的n 代表返回纪录的最大条数。

例子

只返回5条纪录

REST
/cars?filter[limit]=5
Node API
Cars.find( {limit: 5},  function() { ... } )