Creating An Optimized Switch Directive For Use With ngRepeat In AngularJS