I’m new with ionic framework, i have problem updating my badge dynamic value, see my code below,
<ion-view>
<ion-nav-title>
<div class="item" style="padding: 0; background: transparent;">
<span>My Title Here</span>
<span class="badge badge-assertive">
{{ MyRecordAgain.length }} PCS
</span>
</div>
</ion-nav-title>
<ion-content>
<ion-list>
<ion-item collection-repeat="rec in MyRecordAgain = (MyRecord | searchContacts:filterKey | orderBy:'NAME')">
{{rec.NAME}}
</ion-item>
</ion-list>
</ion-content>
this code always show “PCS” on badge title. the right value is “XXX PCS”, where XXX is my record count when filtering.
but when i change my code with this code, the value is right.
<ion-nav-title>
<div class="item" style="padding: 0; background: transparent;">
<span>My Title Here</span>
<span class="badge badge-assertive">
{{ (MyRecord | searchContacts:filterKey | orderBy:'NAME').length }} PCS
</span>
</div>
</ion-nav-title>
is it bug? i use ionic v1.1.0