When ever you change CSV file, the Library actually changes the users Header configuration.
The $scope.$watch in the following code should really NEVER trigger, as this is a user configuration, and this configuration should be considered as a non-mutable ruleset, but every time you change file.
var csvShouldUseHeader = false;
$scope.csv = {
separator: ",",
header: csvShouldUseHeader,
accept: '.csv'
};
$scope.$watch("csv.header", function(newValue){
if(newValue !== csvShouldUseHeader){
//This log shows that some bad behaviour is happening from with the library.
console.log("We are trying to change the header property to something we didn't specify", newValue);
//The following line corrects the header property back to what we have specified. A user fix to the library that really shouldnt be needed.
$scope.csv.header = csvShouldUseHeader;
}
});
When ever you change CSV file, the Library actually changes the users Header configuration. The $scope.$watch in the following code should really NEVER trigger, as this is a user configuration, and this configuration should be considered as a non-mutable ruleset, but every time you change file.