Skip to content

Conversation

@MileanCo
Copy link

…ler settings

Fixes simply by adding a short $timeout that waits for the {{ }} variables to finish resolving.

@MileanCo
Copy link
Author

Any update here @tobyn ??

@tobyn
Copy link
Owner

tobyn commented Oct 25, 2017

I'm not likely to add a random $timeout to this library for no good reason. Give me a concise test case (or a decent explanation as to why this is a problem with the library rather than your app), and I'll be happy to merge your PR.

@MileanCo
Copy link
Author

MileanCo commented Oct 27, 2017

I agree with you, but this is the only fix right now for using a publishable_key from $scope (instead of embedding it in the HTML code). The reason we have this in $scope is because we want different Stripe Keys in DEBUG (test) and PRODUCTION (live) environments.

The issue is documented here #21
My theory is that with a very short timeout (50ms - can probably get away with even less, like 15ms or something), the angular $scope has time to register the {{publishable_key}} with the real value.

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

Successfully merging this pull request may close these issues.

2 participants