javascript - Angular - how to print value of key value -
i have $scope.count want show count of specific data in table. made :
$result = $this->_em->createquerybuilder() ->select('count(u.teamid)') ->from('mypath\entities\teams', 'u') ->where('u.teamtype =:teamtype') ->setparameters(['teamtype' => 4 ]) ->getquery() ->getscalarresult(); return $result;
i save it's result in $scope.count:
<label class="btn btn-yellow force-btn">model = {{ count }} </label>
result of $scope.count :
[{"1":"2"}]
although , want show 2 . suggestion?
try
<label class="btn btn-yellow force-btn">model = {{ count[0]["1"] }} </label>
Comments
Post a Comment