Using all the keys in first object of array to create the header for CSV file when csv-label set it to true.
It only accepts Boolean value.
ng-csv="dataArray" csv-label="true"
Input data:
$scopedataArray = [ { "Vehicle": "BMW", "Date": "30, Jul 2013 09:24 AM", "Location": "Hauz Khas, Enclave, New Delhi, Delhi, India", "Speed": 42 }, { "Vehicle": "Honda CBR", "Date": "30, Jul 2013 12:00 AM", "Location": "Military Road, West Bengal 734013, India", "Speed": 0 } ];
Using all the keys in first object of array to create the header for CSV file when csv-label set it to true. It only accepts Boolean value.
ng-csv="dataArray" csv-label="true"
Input data:$scopedataArray = [ { "Vehicle": "BMW", "Date": "30, Jul 2013 09:24 AM", "Location": "Hauz Khas, Enclave, New Delhi, Delhi, India", "Speed": 42 }, { "Vehicle": "Honda CBR", "Date": "30, Jul 2013 12:00 AM", "Location": "Military Road, West Bengal 734013, India", "Speed": 0 } ];
Output file:![ng-csvheader](https://cloud.githubusercontent.com/assets/6677092/10257399/23e54e1a-6925-11e5-9df9-d9af5ac61c24.png)