Commit 45ef6373 authored by Evren Kutar's avatar Evren Kutar

tekil staff gösterimi

parent 9ba7a25d
......@@ -76,8 +76,7 @@ staff.controller('StaffListCtrl', function($scope, $http){
* Staff Show Controller
*/
staff.controller('StaffShowCtrl', function($scope, $http, $routeParams){
$log.info($routeParams.id);
//$http.get('http://127.0.0.1:3000/api/staff/').then(function(res){
$scope.staff = "";
//})
$http.get('http://127.0.0.1:3000/api/list_staff/').then(function(res){
$scope.staff = res.data[0];
})
});
\ No newline at end of file
<table class="table table-bordered">
<thead>
<tr>
<th ng-repeat="(key,value) in staffs[0]">{{ key }}</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="staff in staffs">
<td ng-repeat="(key,value) in staff">{{value}}</td>
<td><a ng-href="#/s/edit/{{staff.id}}">Edit</a></td>
</tr>
</tbody>
</table>
\ No newline at end of file
<table class="table table-bordered">
<table class="table table-bordered table-responsive">
<thead>
<tr>
<th>name</th>
<th ng-repeat="(key,value) in staffs[0]">{{ key }}</th>
<th>action</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="staff in staffs">
<td><a ng-href="#/staff/{{staff.id}}">{{staff.name}}</a></td>
<td ng-repeat="(key,value) in staff">{{value}}</td>
<td><a ng-href="#/staff/edit/{{staff.id}}">Edit</a></td>
</tr>
......
{{ staff }}
\ No newline at end of file
<p ng-repeat="(key, value) in staff"><span class="col-md-3">{{ key }}:</span>{{
value}}</p>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment