Skip to content

Commit

Permalink
Merge pull request #157 from victorleungtw/master
Browse files Browse the repository at this point in the history
add link from recommendation to beer page
  • Loading branch information
victorleungtw committed Jan 15, 2015
2 parents c8b3b1d + 97eedd7 commit 0003a8f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
7 changes: 4 additions & 3 deletions public/dist/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -761,9 +761,11 @@ angular.module('ratings').controller('RatingsController', ['$scope', '$statePara
$scope.find = function() {
$scope.ratings = Ratings.query();


var userId = Authentication.user._id;

$scope.ratings.$promise.then(function(data){
console.log(data);
getPredition(data[0].user._id);
getPredition(userId);
});
};

Expand Down Expand Up @@ -804,7 +806,6 @@ angular.module('ratings').controller('RatingsController', ['$scope', '$statePara
PredictionIO.getRecommendaton(userId).success(function(data, status){
Beer.getData(data.itemScores[0].item).success(function(data, status){
$scope.itemScores = [data.data];
console.log(data.data);
});
});
};
Expand Down
Loading

0 comments on commit 0003a8f

Please sign in to comment.