My ng-repeat is not working with the table - only the header part is being displayed in the output. I have checked my binding and it seems to be correct, but I know I am missing something. Can someone please help me figure out what I am doing wrong?
JAVA SCRIPT:
var myapp=angular.module("MyApp",[]);
var controller=function($scope)
{
var technology1=[
{Name: "C#",Likes: 0,Dislikes: 0},
{Name: "JAVA",Likes:0,Dislikes:0},
{Name: "Python",Likes:0,Dislikes:0}
];
$scope.technology=technology1;
$scope.incrementLikes=finction(technology)
{
technology.Likes++;
}
$scope.discrementLikes=function(technology)
{
technology.Dislikes++;
}
}
myapp.controller('MyController',controller);
<html ng-app="MyApp">
<head>
<title></title>
<script src="angular.js"></script>
<script src="Day2.js"></script>
</head>
<Body ng-controller="MyController">
<div >
<table border='2'>
<thead>
<tr>
<th>Name Of Technology</th>
<th>Likes</th>
<th>Dislikes</th>
<th>Likes/Dislikes</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="tech in technology">
<td>{{tech.Name}}</td>
<td>{{tech.Likes}}</td>
<td>{{tech.Dislikes}}</td>
<td>
<input type="button" value="Like" ng-click="incrementLikes(tech)">
<input type="button" value="Dislikes" ng-click="decrementLikes(tech)">
</td>
</tr>
</tbody>
</table>
</div>
</Body>
</html>