I have a tag using a class="glyphicon glyphicon-shopping-cart" from bootstrap. And I would like to add on the bottom right the number of check-boxes checked and to display the new number each time the user checked or unchecked on of the box. My glyphicon is in the header and the check-boxes are displayed in a ng-repeat loop. I have some difficulty with angularjs and I don't really know how to do it, if I have to use a directive, or a controller. If you got any kind of help for it I will take it.
My view where are check-boxes itemSearch-result.js there is no controller, only directives
<tbody>
<tr ng-repeat="item in chart.items>
...
<td>{{ ad.price | ypcurrency }}</td>
<td> <input type="checkbox"> </td>
</tr>
</tbody>
My header view, with a controller: ng-controller="HeaderCtrl"
<ul class="nav-right pull-right list-unstyled">
<li>
<a class="toggle-min" href>
<i class="glyphicon glyphicon-shopping-cart"></i>
</a>
</li>
<li class="dropdown text-normal nav-profile" dropdown>
<a href class="dropdown-toggle" dropdown-toggle>
<span class="hidden-xs">
<span>{{user.firstName}} {{user.lastName}}</span>
</span>
<i class="fa fa-user"></i>
</a>
</li>
...
</ul>
ng-model's are bound to. Show us some markup