Mahmoud Ahmed Mahmoud Ahmed - 5 months ago 16
AngularJS Question

My ng-repeat is not working! AngularJs

## HTML File:##

<html ng-app = "TM">
<h1> Requested Businesses </h1>
<form class="form">
<body ng-controller = "appController">
<table class="col-xs-12">
<tr>
<th>Email</th>
<th>BusinessName</th>
<th></th>
</tr>

<h1 ng-repeat= "item in protocolList">
<tr>
<td>{{item.requesterMail}}</td>
<td>{{item.business_name}}</td>




Doesn't display anything in my html view :(



## Angular Controller:##

angular.module('TM', ['AppRoutes']).controller('appController', function($scope, $http,$location){

$http({
method: 'GET',
url: '../businessreq',
}).then(function(data) {
$scope.protocolList= data.data;
console.log($scope.protocolList);

});

});




The console prints the protocolList Correctly


Answer Source

You can't have a h1 between td elements. Place your ng-repeat in the tr, remove your h1 and it should work.