Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot use Promise to retrieve header #201

Open
ORESoftware opened this issue Mar 10, 2017 · 1 comment
Open

cannot use Promise to retrieve header #201

ORESoftware opened this issue Mar 10, 2017 · 1 comment

Comments

@ORESoftware
Copy link

I can use a promise to retrieve the rows for the csv file, but I cannot seem to use a promise to retrieve the header, e.g.:

     <button 
        type="button" ng-csv="getArray(acquisition)"
       csv-header="getCSVExportFileHeader()"
       filename="cdt-export-{{acquisition.companyName}}.csv">

     $scope.getCSVExportFileHeader = function(){
          return HomeService.getCSVHeader(); // returns a promise
       };

I don't think this library can handle a promise here - of course, there is a race condition if the header returns after the array, but I think the users of the library can handle this race condition :)

So my request is for you to support a promise to retrieve the header, thanks!

@yusuf9982
Copy link

@ORESoftware - I am unable to retrieve promise data in the csv file.
can you please share scope method which returns the promise for data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants