leonardosalles / ionic2-zoom-area

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

zoom-area is not an known element #15

Closed ericappcomm closed 6 years ago

ericappcomm commented 6 years ago

I want a image to be zoomed and scrollable (like in ionic2 )

'zoom-area' is not a known element:

  1. If 'zoom-area' is an Angular component, then verify that it is part of this module.

package.json: "@angular/animations": "4.1.2", "ionic2-zoom-area": "^1.0.16",

app.module.ts: import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { ZoomAreaModule } from 'ionic2-zoom-area'; [...] imports: [ BrowserAnimationsModule, ZoomAreaModule.forRoot() [...]

places.html:

zoom it

Ionic 3: 3.20.0 cordova: 7.0.1

How to get this working?

leonardosalles commented 6 years ago

Probably you are importing the module at the wrong place, please check it again and the example app.

gusreyes01 commented 6 years ago

I'm having the same issue with Ionic 3.

tatianilima commented 6 years ago

gureyes01 you need to import ZoomAreaModule in your shared module or child modules. I solved this question with this:

import { ZoomAreaModule } from 'ionic2-zoom-area';

@NgModule({ ... imports: [ ... ZoomAreaModule ], ... }) export class SharedModule {}

odortega commented 4 years ago

This does worked for me with ionic 3

in app.module.ts ... import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; ...

And then

@NgModule({ ... providers:[ . . . ], schemas: [CUSTOM_ELEMENTS_SCHEMA] ... }) export class AppModule {}