Skip to content

Commit 82369aa

Browse files
committed
Cleaning up
1 parent 92234ed commit 82369aa

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

app.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,11 @@ app.controller('macroCtrl', function ($scope){
9494
}
9595
}
9696

97+
$scope.getName = function(){
98+
if($scope.user.name===undefined || $scope.user.name==="")
99+
return "";
100+
101+
return $scope.user.name+"'s";
102+
}
103+
97104
});

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<div class="row">
4242
<div class="col-sm-12">
4343
<p class="bg-primary kcal-flash">
44-
<b>&nbsp;{{user.name}}&nbsp;Basic Metabolic Rate: &nbsp; </b>&nbsp; {{ getMetaRate()}}
44+
<b>&nbsp;{{getName(user.name)}}&nbsp;Basic Metabolic Rate: &nbsp; </b>&nbsp; {{ getMetaRate()}}
4545
</p>
4646
</div>
4747
</div>

0 commit comments

Comments
 (0)