Angular: ng-repeat scope - 14410993
http://angularjs.org/
HTML
<div ng-controller="MyCtrl">
<table id="1" border=1>
<tr ng-repeat="line in lines" ng-show="id == 1">
<td>{{line.text}}</td>
</tr>
</table>
<table id="2" border=1 style="margin-top:10px">
<tr ng-repeat="line in lines" ng-show="id == 2">
<td>{{line.text}}</td>
</tr>
</table>
</div>
JavaScript
var myApp = angular.module('myApp', []);
//myApp.directive('myDirective', function() {});
//myApp.factory('myService', function() {});
function MyCtrl($scope) {
$scope.id = 1;
$scope.lines = [{
text: 'res1'
}, {
text: 'res2'
}];
}