Skip to content

Commit

Permalink
languagesDirective: Adapt the /list/bears API change
Browse files Browse the repository at this point in the history
  • Loading branch information
meetmangukiya committed Jun 17, 2017
1 parent 57dfaf2 commit 2fc01e8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions resources/js/Directives/languagesDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ app.directive('languages', ['$http', '$timeout' ,function ($http, $timeout) {
$http.get(api_link + '/list/bears')
.then(function(data){
arr = []
angular.forEach(Object.keys(data["data"]), function(value, key){
angular.forEach(data["data"], function(bear){
arr.push({
"name" : value,
"desc" : data["data"][value]["desc"],
"languages": data["data"][value]["languages"]
"name" : bear["name"],
"desc" : bear["desc"],
"languages": bear["languages"]
})
})
$scope.bearList = arr
Expand Down

0 comments on commit 2fc01e8

Please sign in to comment.