Closed 4i-helpynet closed 8 months ago
Is your ngx-stripe major version matching angular major version?
If you're using Angular 15 for example, you should install ngx-stripe version 15.
Also, can I see a snippet on what are you trying to do with the library?
Describe the bug A clear and concise description of what the bug is. After adding ngx-stripe into the module.ts with working test key - but not add to the component, I get this error:
Error: node_modules/ngx-stripe/lib/components/address.component.d.ts:41:97 - error TS2344: Type '{ containerClass: { alias: "containerClass"; required: false; }; options: { alias: "options"; required: false; }; elementsOptions: { alias: "elementsOptions"; required: false; }; stripe: { alias: "stripe"; required: false; }; }' does not satisfy the constraint '{ [key: string]: string; }'. Property '"containerClass"' is incompatible with index signature. Type '{ alias: "containerClass"; required: false; }' is not assignable to type 'string'.
41 static ɵcmp: i0.ɵɵComponentDeclaration<StripeAddressComponent, "ngx-stripe-address", never, { "containerClass": { "alias": "containerClass"; "required": false; }; "options": { "alias": "options"; "required": false; }; "elementsOptions": { "alias": "elementsOptions"; "required": false; }; "stripe": { "alias": "stripe"; "required": false; }; }, { "load": "load"; "blur": "blur"; "change": "change"; "focus": "focus"; "ready": "ready"; "escape": "escape"; "loaderror": "loaderror"; "loaderstart": "loaderstart"; }, ["loadingTemplate"], never, true, never>;
To Reproduce Steps to reproduce the behavior:
Angular: 15.2.9 ... animations, common, compiler, compiler-cli, core, forms ... platform-browser, platform-browser-dynamic, router
Package Version
@angular-devkit/architect 0.1502.8 @angular-devkit/build-angular 15.2.8 @angular-devkit/core 15.2.8 @angular-devkit/schematics 15.0.5 @angular/cli 15.0.5 @schematics/angular 15.0.5 rxjs 7.5.7 typescript 4.8.4
2: install ngx-stripe, @stripe/stripe.js 3 add ngx-stripe to the app.model.ts 4 run ng serve --hmr