Implements ng-repeat to DRY out avg totals HTML and controller logic.