leonardosalles / ionic2-zoom-area

A zoom area component with pinch support
MIT License
33 stars 13 forks source link

ionic2-zoom-area dependencies and minimum setup version #1

Closed pedrolavor closed 6 years ago

pedrolavor commented 6 years ago

Hello, I'm trying to use this module, but it seems to be not working in Ionic 2 and Ionic3. In Ionic 2 it was showing a dependecy error about angular/animations. When I installed it, another dependency error but on angular/platform-browser/animations. Looking at your dependency project it seems to have Ionic 3 suport, so I've updated my project, but now it shows that its not a known element.

So my question is: what's the best setup version and important dependencies? It's for Ionic 2 or 3?

Current setup:

"dependencies": { "angular/animations": "^4.4.6",
"angular/common": "^4.4.3", "angular/compiler": "^4.4.3", "angular/compiler-cli": "^4.4.3", "angular/core": "^4.4.3", "angular/forms": "^4.4.3", "angular/http": "^4.4.3", "angular/platform-browser": "^4.4.3", "angular/platform-browser-dynamic": "^4.4.3", "angular/platform-server": "^2.2.1", "ionic-native/geolocation": "^4.2.1", "ionic-native/status-bar": "^4.2.1", "ionic/storage": "2.0.0", "types/google-maps": "^3.2.0", "angular2-qrcode": "^2.0.1", "cordova-android": "^6.2.3", "cordova-plugin-compat": "^1.0.0", "cordova-plugin-console": "^1.0.5", "cordova-plugin-device": "^1.1.4", "cordova-plugin-geolocation": "^2.4.3", "cordova-plugin-network-information": "^1.3.3", "cordova-plugin-splashscreen": "^4.0.3", "cordova-plugin-statusbar": "^2.2.1", "cordova-plugin-whitelist": "^1.3.1", "font-awesome": "^4.7.0", "ionic-angular": "^3.7.1", "ionic-native": "^2.2.1", "ionic-plugin-keyboard": "^2.2.1", "ionic2-zoom-area": "^1.0.9", "ionicons": "^3.0.0", "jquery": "^3.1.1", "rxjs": "^5.4.3", "sw-toolbox": "^3.6.0", "ts-md5": "^1.2.2", "zone.js": "^0.8.18" }

leonardosalles commented 6 years ago

Hi Pedro,

Did you checked the example project? The only issue that I can reproduce is when try to install the app without angular animations, you can check the example and validate the versions of the libs, including @angular/animations.

Another possibility is about your module, this issue about known elements happen when you include the module in a module that is not related with you actual module.

Try to include it in a SharedModule and then include this shared module in your page module ;)

if you check this link you will see that HomePage is included inside my app module and zoom area module also imported for this module too here.

pedrolavor commented 6 years ago

Hi Leonardo, thanks for replying.

I've solved it!! Really dind't got it working on Ionic 2, I don't know why it requires those dependencies angular/animations, angular/platform-browser/animations.

So, I've updated my package.json to install Ionic 3 dependencies following this, the result is above on my first post. Then, follow the steps to import ionic2-zoom-area in app.modules.ts, but the tag was not recongnized. After reading this, I've also declared it into the import array in my custom module declaration NgModule, and it works fine.

Thanks again Leonardo!! Peace... Closing this.

leonardosalles commented 6 years ago

Sure, no problems, if you find any bugs please let me know, I am using this module in a big company project so it will be good to know about any issues.

😜