$index in ng-repeat (angular 2)

17 views
Skip to first unread message

Marián Rohaľ

unread,
Jan 19, 2018, 4:59:07 AM1/19/18
to Angular and AngularJS discussion
Hi,

I have php file with:
<md-option ng-repeat="specializacia in specializacie.[{$index}]"  ng-value="specializacia.ids">{{specializacia.nazov}}</md-option>
 
and script:

 $scope.specializacie ={[index]:data};       


This  ng-repeat   is inside different ng-repeat.    
     
I would like to for every new one ng-repeat ,they were loaded new items to the other ng-repeat.

it is possible?

Thanx Marian

Tito

unread,
Jan 19, 2018, 10:23:12 AM1/19/18
to Angular and AngularJS discussion
I think you need to capture some event change using maybe ngModelChange or change

(ngModelChange)="modelChanged($event)"
Capture that to get new data for the inner ng-repeat?
Reply all
Reply to author
Forward
0 new messages