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

Item reveal events not fired if initialising WowService with no arguments #19

Closed
MichaelNel opened this issue Oct 5, 2018 · 0 comments

Comments

@MichaelNel
Copy link
Contributor

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Repro steps

  1. Initialise the WowService with no arguments.
  2. Subscribe to item revealed events.
  3. Reveal the element.

The event is not fired.

Desired functionality

The event should be fired for registered subscriptions.

Mention any other details that might be useful

It's a typo, should be passing conf when initialising wow js in the WowService. For a temporary fix until the library is fixed you can pass in an empy object when initialising the WowService e.g. WowService.init({}).

  init(config?: NgwWowConfig): void {
    if (this.window) { // For Angular Universal suport
      let conf = config || {};
      // Set callback hook:
      conf.callback = () => this.itemRevealedSource.next();

      // Initializes the library
      new WOW(config).init();
    }
}
MichaelNel added a commit to MichaelNel/ngx-wow that referenced this issue Oct 7, 2018
MichaelNel added a commit to MichaelNel/ngx-wow that referenced this issue Oct 7, 2018
tinesoft pushed a commit that referenced this issue Oct 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants