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

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -