Fixed issue 24 where publishable-key could not be loaded from control…
…ler settings
Fixes simply by adding a short $timeout that waits for the {{ }} variables to finish resolving.
Any update here @tobyn ??
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.
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 https://github.com/tobyn/angular-stripe-checkout/issues/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.