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 read from $scope #296

Closed
rebelholic opened this issue May 20, 2015 · 2 comments
Closed

Cannot read from $scope #296

rebelholic opened this issue May 20, 2015 · 2 comments
Labels

Comments

@rebelholic
Copy link

Hello,

I have an ionic application with PDF download feature (with this plugin). When generating data to create a PDF, this plugin just read data from $localstorage (such as $localstorage.dataname.a) not from $scope. If generate from $scope will get blank text for PDF result.
Its my example variable for this problem:

     var docDefinition = {
    content: [
{ text: $scope.model.name }
   ],
  };

How I can fix it?
Thanks for support

@rebelholic
Copy link
Author

Its my repo for this problem

@jthoenes
Copy link
Contributor

A guess it might be because on the AngularJS $scope there are other things than just pure javascript objects. Maybe watchers or something?

Make sure you pass a plain JavaScript object as document definition. If that does not work, please post the resulting document definition and error messages is you get any in your console.

Hint: Please don't expect anybody to debug a whole project for you. When you provide code, make sure you use as little as possible code to reproduce your issue. I don't want to click through a menu or read a 'getting started guide' of a framework before I can understand you problem.

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

No branches or pull requests

2 participants