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

wrong definition for Element.on #13

Closed
rdpeake opened this issue Nov 24, 2017 · 3 comments
Closed

wrong definition for Element.on #13

rdpeake opened this issue Nov 24, 2017 · 3 comments

Comments

@rdpeake
Copy link

rdpeake commented Nov 24, 2017

Element on footprint should be

on(ev: ElementEventType, handler: (event?: any) => void): void;

as stripe documentation indicates that a parameter is passed to the handler for some of the events.

@lujakob
Copy link

lujakob commented Jan 25, 2018

This is apparently fixed in branch 0.3.0. The problem is this package version is not available in the NPM repository. 'npm view ngx-stripe versions' show the latest version available is 0.2.3
@richnologies Could you please make the latest version available in NPM. Thanks.

@smlee
Copy link

smlee commented Feb 2, 2018

@lujakob
just bind this to the callback

ex.

this.card.on('change', this.onChange.bind(this));
...
onChange(event) {
  console.log(event)
}

@lujakob
Copy link

lujakob commented Feb 2, 2018

@smlee Awesome, that works! Thanks.

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

No branches or pull requests

4 participants