-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nguyen Sy Thanh Son
committed
Aug 6, 2015
1 parent
ba9d5c2
commit 6d09cfb
Showing
6 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'use strict'; | ||
/** | ||
* @ngdoc function | ||
* @name sbAdminApp.controller:MainCtrl | ||
* @description | ||
* # MainCtrl | ||
* Controller of the sbAdminApp | ||
*/ | ||
angular.module('sbAdminApp') | ||
.controller('SampleCtrl', function($scope,$position, Sample) { | ||
Sample.get().then(function(data){ | ||
$scope.users = data | ||
}) | ||
}); |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
angular.module('sbAdminApp').factory('Sample', function($http, $q) { | ||
return { | ||
get: function(){ | ||
var deferred = $q.defer(); | ||
$http.get('scripts/services/sample.json').success(function(data) { | ||
deferred.resolve(data) | ||
}).error(deferred.reject); | ||
return deferred.promise; | ||
} | ||
} | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
[{ | ||
"id": "1", | ||
"firstname": "Nguyen Sy", | ||
"lastname": "Thanh Son", | ||
"username": "thanhson1085" | ||
}, | ||
{ | ||
"id": "2", | ||
"firstname": "Mark", | ||
"lastname": "Otto", | ||
"username": "mdo" | ||
}, | ||
{ | ||
"id": "3", | ||
"firstname": "Athony", | ||
"lastname": "Vinc", | ||
"username": "anthony" | ||
}, | ||
{ | ||
"id": "4", | ||
"firstname": "Do", | ||
"lastname": "Minh Khai", | ||
"username": "minhkhai" | ||
}, | ||
{ | ||
"id": "5", | ||
"firstname": "Ba Ngoc", | ||
"lastname": "Cuong", | ||
"username": "bangoccuong" | ||
}, | ||
{ | ||
"id": "6", | ||
"firstname": "Adam", | ||
"lastname": "East", | ||
"username": "adam" | ||
}, | ||
{ | ||
"id": "7", | ||
"firstname": "Larry", | ||
"lastname": "Bird", | ||
"username": "larry" | ||
}] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<div class="row"> | ||
<div class="col-lg-12"> | ||
<h1 class="page-header">Tables</h1> | ||
</div> | ||
<!-- /.col-lg-12 --> | ||
</div> | ||
<!-- /.row --> | ||
<div class="row"> | ||
<div class="col-lg-12"> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
Basic Table | ||
</div> | ||
<!-- /.panel-heading --> | ||
<div class="panel-body"> | ||
<div class="table-responsive"> | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th>#</th> | ||
<th>First Name</th> | ||
<th>Last Name</th> | ||
<th>Username</th> | ||
</tr> | ||
</thead> | ||
<tbody ng-repeat="user in users"> | ||
<tr> | ||
<td>{{ user.id }}</td> | ||
<td>{{ user.firstname }}</td> | ||
<td>{{ user.lastname }}</td> | ||
<td>@{{ user.username }}</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<!-- /.table-responsive --> | ||
</div> | ||
<!-- /.panel-body --> | ||
</div> | ||
<!-- /.panel --> | ||
</div> | ||
<!-- /.col-lg-6 --> | ||
</div> |