Last active
December 26, 2015 00:09
-
-
Save esvit/7061932 to your computer and use it in GitHub Desktop.
ngTable: Getting Started
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head lang="en"> | |
<meta charset="utf-8"> | |
<title>Getting Started With ngTable Example</title> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.3/angular.min.js"></script> | |
<script type="text/javascript" src="https://raw.github.com/esvit/ng-table/master/ng-table.js"></script> | |
<link rel="stylesheet" type="text/css" href="https://raw.github.com/esvit/ng-table/master/ng-table.css" /> | |
</head> | |
<body> | |
<div id="demo" ng-controller="MyCtrl"> | |
<table ng-table class="table"> | |
<tr ng-repeat="user in users"> | |
<td data-title="'Name'">{{user.name}}</td> | |
<td data-title="'Age'">{{user.age}}</td> | |
</tr> | |
</table> | |
</div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = angular.module('myApp', ['ngTable']); | |
app.controller('MyCtrl', function($scope) { | |
$scope.users = [ | |
{name: "Moroni", age: 50}, | |
{name: "Tiancum", age: 43}, | |
{name: "Jacob", age: 27}, | |
{name: "Nephi", age: 29}, | |
{name: "Enos", age: 34} | |
]; | |
}); | |
angular.bootstrap(document.getElementById('demo'), [app.name]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.ng-table { | |
border: 1px solid #000; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment