We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 92234ed commit 82369aaCopy full SHA for 82369aa
app.js
@@ -94,4 +94,11 @@ app.controller('macroCtrl', function ($scope){
94
}
95
96
97
+ $scope.getName = function(){
98
+ if($scope.user.name===undefined || $scope.user.name==="")
99
+ return "";
100
+
101
+ return $scope.user.name+"'s";
102
+ }
103
104
});
index.html
@@ -41,7 +41,7 @@
41
<div class="row">
42
<div class="col-sm-12">
43
<p class="bg-primary kcal-flash">
44
- <b> {{user.name}} Basic Metabolic Rate: </b> {{ getMetaRate()}}
+ <b> {{getName(user.name)}} Basic Metabolic Rate: </b> {{ getMetaRate()}}
45
</p>
46
</div>
47
0 commit comments