Use ng-show instead of ng-if, prevents some weird issue with activeRowIndex between directive and controller.