bendrucker / angularjs-stripe

Angular Stripe.js service that returns promises for token calls
MIT License
333 stars 72 forks source link

Angular 1.4.8 Fails To Instantiate Module - Please Help! #47

Closed cartofrontdev closed 8 years ago

cartofrontdev commented 8 years ago

Hi There!

I'm really excited to use this library you created. However in my naive approach I added the module via bower, where I specified the latest version:

"angular-stripe": "*"

I then included stripejs above the script reference like this in my index.html:

<script type="text/javascript" src="https://js.stripe.com/v2/"></script>

However after starting the app, I receive a failure to instantiate module.

[$injector:modulerr] Failed to instantiate module angular-stripe due to: $[injector:nomod] Module 'angular-stripe' is not available.

My bower injects this into the index.html:

<script src="wwwroot/lib/angular-stripe/release/angular-stripe.js"></script>

All my files are in IFEE blocks and I declare my App like

 var app = angular.module("topSecretAppName",
    [
        "common.services",
        "ngAnimate",
        "ngCookies",
        "ngResource",
        "ngRoute",
        "ui.router",
        "payment",
        "angular-stripe"
    ]);

Thank you in advance for creating this nice library.

~Dennis

cartofrontdev commented 8 years ago

I should also mention that I have included and still no joy.

app.config(["stripeProvider", function(stripeProvider) {
 stripeProvider.setPublishableKey('pk_test_###########');
}
bendrucker commented 8 years ago

Hmm, no idea to be honest. Do you have anywhere I can see this live?

cartofrontdev commented 8 years ago

Please close this issue.

I can not replicate it in plunkr or any other web-based framework. Will have to abandon this library. Thank you for checking it out for me.