Skip to content

Commit

Permalink
fix nutrientId
Browse files Browse the repository at this point in the history
  • Loading branch information
Timothy Morris committed Apr 19, 2017
1 parent eb0873e commit 7ea20af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion app/pages/categories/ctrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ app.controller('CategoryCtrl', ['$scope', '$http', 'Categories', 'Nutrients', fu
if(categoryIndex != -1) {
$scope.categories[categoryIndex].rules[0].push({
ruleId: 0,
nutrientName: $scope.nutrients[0].name,
nutrientId: $scope.nutrients[0].id,
operator: "lte",
threshold: 10,
Expand Down
4 changes: 2 additions & 2 deletions app/pages/categories/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<div class="card-content">
<div class="row">
<div class="col s6">
<select ng-model="rule.nutrientName">
<option ng-repeat="nutrient in nutrients" value="{{nutrient.name}}" ng-selected="nutrient.name==rule.nutrientName">{{nutrient.name}}</option>
<select ng-model="rule.nutrientId">
<option ng-repeat="nutrient in nutrients" value="{{nutrient.id}}" ng-selected="nutrient.id==rule.nutrientId">{{nutrient.name}}</option>
</select>
</div>
<div class="col s6">
Expand Down

0 comments on commit 7ea20af

Please sign in to comment.