Hi Everyone

I have the following code. Everything works fine. I check the $scope in 
debug log and it is getting populated and 4 elements. However, table rows 
are not getting populated

There are no values for  {{item.action}}  &  {{item.done}} 

Thanks in advance for your help

Viren

<!DOCTYPE html>
<html ng-app="demo">
<head>
<title>Promise Example</title>
<script src = "angular.js"></script>
<link href="bootstrap.css" rel="stylesheet" />
    <link href="bootstrap-theme.css" rel="stylesheet" />
    <script type="text/javascript">

    var myapp = angular.module("demo", []);
    myapp.controller("newAppCtrl", function($scope, $http){
    var promise=$http.get("todo.json");
    promise.then(function(data){
    $scope.todos=data;
    console.log("data = "+$scope.todos);
    });
    });
    
    </script>
</head>
<body ng-controller = "newAppCtrl">

<div class="panel">
<h1>
ToDo List
</h1>

<table class="table">
<tr><td>Action</td><td>Done</td></tr>

<tr ng-repeat="item in todos">
<td> {{item.action}} </td>
<td> {{item.done}} </td>

</tr>
</table>
</div>
</body>
</html>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to