Questions tagged [angularjs-ng-repeat]

The `ngRepeat` directive instantiates a template once per item from a collection. Each template instance gets its own scope, where the given loop variable is set to the current collection item, and `$index` is set to the item index or key.

The ngRepeat directive instantiates a template once per item from a collection. Each template instance gets its own scope, where the given loop variable is set to the current collection item, and $index is set to the item index or key.

Special properties are exposed on the local scope of each template instance, including $index, $first, $middle and $last.

Usage

As an attribute

<ANY ng-repeat="{repeat_expression}">
   ...
</ANY>

Directive info

  • This directive creates a new scope.
  • This directive executes at priority level 1000.

Animations

  • enter - when a new item is added to the list or when an item is revealed after a filter
  • leave - when an item is removed from the list or when an item is filtered out
  • move - when an adjacent item is filtered out causing a reorder or when the item contents are reordered

References:

http://docs.angularjs.org/api/ng.directive:ngRepeat

9074 questions
2
votes
1 answer

angular ng-repeat to always show even on empty object

Hi I want to post item to server, and with each successful addition, automatically add it to DOM with ng-repeat
{{book.title}}
to POST the data and also to upload an…
vdj4y
  • 2,649
  • 2
  • 21
  • 31
2
votes
1 answer

AngularJS radio button will not select appropriate button from ng-model object value

I'm working with an AngularJS app that helps configure reports of information about US states. The type of information is not relevant, however context is always nice. So I have a collection of US states, and those states each have a frequency that…
2
votes
0 answers

angularjs translate with two expressions

i am using angular translate to translate my angular website content but i faced a weird problem at some point in the website i use
  • Mohamed A. Shebl
    • 384
    • 3
    • 5
    • 16
  • 2
    votes
    1 answer

    Menu and Submenu in Angularjs

    I'm new at AngularJS and I want to design menu and submenus as shown in following Image - I have already created menus in AngularJS as showing in following image- Same code also added in http://jsfiddle.net/ashokyede20/pLnvsnLa/46/ The following…
    Ashok
    • 197
    • 3
    • 17
    2
    votes
    5 answers

    Angular apply style to the first visible item in ngRepeat

    I have a list generated by ngRepeat, like so
    • {{data.name}}
    and I want the first item in the list to have rounded corners. I have…
    John Henckel
    • 10,274
    • 3
    • 79
    • 79
    2
    votes
    1 answer

    Angular previous/next buttons on detail page and routing via parameters

    I've created this plunker of my project so far. My biggest issue is to do with the 'Next/Previous' item buttons, its functioning to an extent however there are two problems with it. Firstly, there seems to be some mismatch with filtering the data…
    Andy
    • 454
    • 2
    • 7
    • 22
    2
    votes
    2 answers
    2
    votes
    5 answers

    Firing an event when ng-repeat has finished it's work

    I need to update the style for a particular element after ng-repeat has finished changing the dom. Here is my challenge. The directive I have written to fire ng-repeat work's just fine when I am adding items to the model, it doesn't get called…
    Shouvik
    • 11,350
    • 16
    • 58
    • 89
    2
    votes
    2 answers

    Changing ng-class when clicked (nested ng-repeat)

    This is my angular code.. (to describe the problem I'm getting is that the nested ng-repeat for buttons repeats is behavior (when clicked) to all the "jobs" listed..
    2
    votes
    1 answer

    Nested ng-repeat with json strange result

    I've setup a plunkr so demonstrate incase I explain incorrectly. I want to loop through three tiers of an object and only filter the last tier by three keys. I've setup the nested ng-repeat loop but the loop isnt behaving how I expect. Demo of…
    Iamsamstimpson
    • 1,359
    • 2
    • 17
    • 32
    2
    votes
    1 answer

    ngRepeat:dupes error, although there is no duplication

    I have a HTML code like below which I use AngularJS framework within it: