Last active
January 30, 2016 05:12
-
-
Save furenku/10aa080b2db473872121 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
.controller('UsersCtrl', | |
["$scope", "$state", "$http",function($scope, $state, $http){ | |
$http.get("http://localhost:8000/api/v0/users/", { cache: true }) | |
.success(function(data) { | |
$scope['users'] = data; | |
if (data['next']) $scope.nextPage = 2; | |
}); | |
return $scope; | |
}]) |
This file contains hidden or 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
--- | |
name: users | |
url: /users | |
controller: UsersCtrl | |
--- | |
<div class="grid-content users" ng-show="users"> | |
<div class="grid-content shrink"> | |
<select class=""> | |
<option class="" ng-repeat="user in users" value="{{user.id}}"> | |
<div class="grid-block">{{user.username}}</div> | |
<div class="grid-block">{{user.name}}</div> | |
<div class="grid-block">{{user.email}}</div> | |
</option> | |
</select> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment