None
None

Reputation: 9247

How to limit from 8 to rest of them?

Is it possible to write something like ng-repeat="s in sportMenu | limitTo:all:7> So idea is to skip first seven and get rest of them ?

Upvotes: 0

Views: 37

Answers (4)

Sulthan
Sulthan

Reputation: 130132

You don't need angular expressions for that, there is already a pure javascript solution:

ng-repeat="s in sportMenu.slice(7)"

Upvotes: 0

eladcon
eladcon

Reputation: 5825

You can either set the number specifically sportMenu.length - 7 or set the limit to the length of sportMenu:

From the docs

The limit will be trimmed if it exceeds array.length

ng-repeat="s in sportMenu | limitTo:sportMenu.length:7"

Upvotes: 2

Malek Hijazi
Malek Hijazi

Reputation: 4162

ng-repeat="s in sportMenu" ng-if="$index > 6"

Upvotes: 1

user3227295
user3227295

Reputation: 2156

you can use

ng-repeat="s in sportMenu" ng-if="$index>6"

Upvotes: 1

Related Questions