hussain hussain - 1 year ago 75
Javascript Question

ng-repeat is not binding values into Dom?

I am loading data dynamically to ng-repeat so once i receive data its not binding it to

, i know sometime it happens if you have duplicate indexes but in below case i am not sure what is happening, Any idea ?


<ul ng-repeat="message in data track by index">


angular.module('loggingApp').controller('DitCtrl',function ($scope,DitFactory) {
'use strict';
DitFactory.getLogs().then(function (response) {
$ =;


printing data in console

["test.txt", "test1.txt", "test2.txt", "test3.txt", "test4.txt"]

Answer Source

Your ng-repeat needs to look like this:

ng-repeat="message in data track by $index"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download