What is the use of AngularJS Modules ?

An AngularJS module defines an application. AngularJS supports modular approach. Modules are used to separate logics say services, controllers, application etc. and keep the code clean. We define modules in separate js files and name them as per the module.js file. In this example we’re going to create two modules.… Read more

What is the use of AngularJS Tables ?

In AngularJS ng-repeat directive is perfect for displaying tables.

Multiple records will bind in table row.

<div ng-app=”myApp” ng-controller=”usersCtrl”>

<table>
<tr ng-repeat=”x in names”>
<td>{{ x.userName }}</td>
<td>{{ x.userCountry }}</td>
</tr>
</table>

</div>

<script>
var app = angular.module(‘myApp’, []);
app.controller(‘usersCtrl’, function($scope, $http) {
$http.get(“http://www.yoursite.com/api/users.php”)
.success(function (response) {$scope.names = response.records;});
});

Read more