tinesoft / ngx-wow

Angular module for WOW.js: a customizable library to reveal animations when you scroll.
https://tinesoft.github.io/ngx-wow
MIT License
32 stars 7 forks source link

WOW is not defined #15

Closed ali-hasani closed 6 years ago

ali-hasani commented 6 years ago

Hi friends ! I have done all instructions that you say but i have this error .. Please help me to solve it ..

wow error

tinesoft commented 6 years ago

Hi @alihasaniGit

Can you provide at least the info mentioned in the issue template? Without those minimum info, i'm afraid i cannot help you much.. :( Also, what is your setup? are you using angular CLI or another starter?

Thanks

ali-hasani commented 6 years ago

Hi again .. I have done all instructions step by step from this link exactly and i use Angular CLI .. after i did all steps i got this error ! I'm thinking what other info should i give, but i think these are enough because i only did all instructions from the official site .. If you want other info i would be happy to give .. Thanks a lot ..

tinesoft commented 6 years ago

OS and Version?

Windows 7, 8 or 10. Linux (which distribution).macOS(Yosemite ? El Capitan? Sierra ?)

Versions

Output from: ng --version, in case you are using Angular CLI. Otherwise, output from: node --version , npm --version, yarn --version and Angular version.

Repro steps

Simple steps to reproduce this bug.

Please include: commands run, packages added, related code changes. A link to a sample repo would help too.

Generally speaking, providing the name AND the version of tools/libraries you use, is crucial to help identify/fix an issue.

ali-hasani commented 6 years ago

Info : Windows 10 Angular : 4 Angular CLI : 1.2.6 node : 8.1.2 npm: 5.0.3

After i did all instructions i run project with "ng serve" and there was no error in command line window, but in the browser console i saw this error ..

These are all packages i'm using :

"dependencies": { "@agm/core": "1.0.0-beta.0", "@angular/animations": "4.3.0", "@angular/cdk": "2.0.0-beta.8", "@angular/common": "4.3.0", "@angular/compiler": "4.3.0", "@angular/core": "4.3.0", "@angular/flex-layout": "2.0.0-beta.8", "@angular/forms": "4.3.0", "@angular/http": "4.3.0", "@angular/material": "2.0.0-beta.8", "@angular/platform-browser": "4.3.0", "@angular/platform-browser-dynamic": "4.3.0", "@angular/router": "4.3.0", "@ngx-translate/core": "7.1.0", "@ngx-translate/http-loader": "0.1.0", "@swimlane/ngx-datatable": "^9.3.1", "angular-calendar": "0.19.0", "angular-tree-component": "3.8.0", "angular2-toaster": "^4.0.1", "chart.js": "2.6.0", "core-js": "2.4.1", "d3": "4.10.0", "dragula": "3.7.2", "hammerjs": "2.0.8", "intl": "1.2.5", "jalali-moment": "2.0.2", "jquery": "^3.2.1", "json2csv": "^3.10.0", "leaflet": "1.1.0", "moment": "2.18.1", "ng2-charts": "1.6.0", "ng2-drag-drop": "^1.5.1", "ng2-dragula": "1.5.0", "ng2-file-upload": "1.2.1", "ng2-img-cropper": "^0.9.0", "ng2-jalali-date-picker": "^1.5.5", "ng2-validation": "4.2.0", "ngx-carousel": "^1.3.5", "perfect-scrollbar": "0.7.1", "quill": "1.3.0", "rxjs": "^5.4.2", "screenfull": "3.3.1", "smooth-scrollbar": "^8.0.4", "zone.js": "0.8.10" }, "devDependencies": { "@angular/cli": "1.2.6", "@angular/compiler-cli": "4.3.0", "@angular/language-service": "4.3.0", "@types/jasmine": "~2.5.53", "@types/jasminewd2": "~2.0.2", "@types/jquery": "^3.2.17", "@types/node": "~6.0.60", "codelyzer": "~3.0.1", "jasmine-core": "~2.6.2", "jasmine-spec-reporter": "~4.1.0", "karma": "~1.7.0", "karma-chrome-launcher": "~2.1.1", "karma-cli": "~1.0.1", "karma-coverage-istanbul-reporter": "^1.2.1", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.1.2", "ts-node": "~3.0.4", "tslint": "~5.3.2", "typescript": "^2.4.2" }

tinesoft commented 6 years ago

Hi,

There is no "ngx-wow" in your dependencies... (did you installed it in devDpendencies?, if so, move it to dependenciessection instead).

Also, i have indeed forgot to mention in the docs that "wowjs" (which is a peerDependencyof this lib) must be installed as well as dependenciesof your app (sorry :( )

npm install --save wowjs

I will update the documentation shortly.

Thanks for reporting!

ali-hasani commented 6 years ago

you're welcome. it's my duty.

I uninstalled "ngx-wow" because it made another problem for the project .. The new problem is that when i install "ngx-wow", it causes that my "ngx-carousel" package gets removed .. If i can solved this new problem i can try your solution that said ..

So, now we have two problems :

  1. When i install "ngx-wow", my "ngx-carousel" gets removed ..
  2. WOW is not defined (Our main problem)

If you help me to solve first (number 1) problem, i can try your solution for our main problem ..

Thanks a lot friend ..

ali-hasani commented 6 years ago

I resolved the first problem (number 1). now I have "ngx-wow" and "wowjs" in my project, but I have the main problem yet .. WOW is not defined Is there any thing i should do ?

tinesoft commented 6 years ago

Hi,

I forgot to mention another important piece: you also need to update your .angular-cli.json to reference the third party library wowjs:

.angular-cli.json (scripts section)

...
  "scripts": [
        "../node_modules/wowjs/dist/wow.js"
      ],
...

With that, you should no longer have the problem of 'WOW being undefined'

The documentation will be updated hopefully tonight

ali-hasani commented 6 years ago

Woooooow ! It fixed. Your solution was absolutely correct .. Thanks a lot friend !

nagthgr8 commented 4 years ago

I have this same problem still running in Angular 9, after following all steps as discussed here