asafdav / ng-csv

Simple directive that turns arrays and objects into downloadable CSV files
MIT License
573 stars 215 forks source link

ng-csv still fires when ng-disabled is true #124

Open johnecon opened 8 years ago

asafdav commented 8 years ago

Can you please share a reproduction recipe?

johnecon commented 8 years ago
<a href="#" ng-disabled="SelectedItems.length<1" class="btn btn-lg btn-green"
                ng-csv="getArray" filename="RawMaterials.csv" field-separator=";" decimal-separator=".">
                <span class="glyphicon glyphicon-export"></span> Export to CSV 
            </a>
daniel-van-niekerk commented 7 years ago

What I've done in the meantime is use ng-if or ng-show to hide the button if it shouldn't be clicked. Not ideal but it works at least.