Changes ng-show from scope property to function