Coder Social home page Coder Social logo

Comments (10)

jonscyriac avatar jonscyriac commented on August 12, 2024 6

Add ImageCropperComponent in AppModule declarations

import {ImageCropperComponent} from 'ng2-img-cropper';

@NgModule({
declarations: [
.....,
ImageCropperComponent,
....
],
imports: [
.....
],
providers: [.....],
bootstrap: [AppComponent]
})
export class AppModule {}

from angular2-img-cropper.

StefanSinapov avatar StefanSinapov commented on August 12, 2024 1

Hi @cstefanache,
Can you export ngModule with the component, because with the angular rc.6 update they removed the deprecated directives prop from @component decorator

from angular2-img-cropper.

sunshineo avatar sunshineo commented on August 12, 2024 1

You should import the module and put that in the imports section.

from angular2-img-cropper.

cstefanache avatar cstefanache commented on August 12, 2024

Hello,

I updated the sample plnkr: https://embed.plnkr.co/V91mKCNkBQZB5QO2MUP4/
to use rc.5 and it seems to work:
image

from angular2-img-cropper.

cstefanache avatar cstefanache commented on August 12, 2024

Any news on this issue?

from angular2-img-cropper.

pedropvaz avatar pedropvaz commented on August 12, 2024

hi, unfortunately still can't configure it in my environment for the same reasons mentioned previously
(plnkr is also not working in my browsers: the image simply doesn't appear in canvas after file selection. but probably the issues aren't connected)
any further help would be highly appreciated. best regards

from angular2-img-cropper.

cstefanache avatar cstefanache commented on August 12, 2024

There was a problem with the cropper that was fixed this morning and released on 6.0.1 - that is why the plnkr did not work - can you please try now so we can make sure that it is still reproducible for you with 6.0.1 as well?

from angular2-img-cropper.

gauravdhiman avatar gauravdhiman commented on August 12, 2024

I am also facing this. What is the solution for this ?
I am using ver 0.7.1 of image-cropper component. Any help would be appreciated.

from angular2-img-cropper.

sunshineo avatar sunshineo commented on August 12, 2024

@jonscyriac What you give causes another error

ERROR in Type ImageCropperComponent in /Users/gordon/workspace/CrewGuru/crewguru-web-ng2/node_modules/ng2-img-cropper/src/imageCropperComponent.d.ts is part of the declarations of 2 modules: ImageCropperModule in /Users/gordon/workspace/CrewGuru/crewguru-web-ng2/node_modules/ng2-img-cropper/src/imageCropperModule.d.ts and AppModule in /Users/gordon/workspace/CrewGuru/crewguru-web-ng2/src/app/app.module.ts! Please consider moving ImageCropperComponent in /Users/gordon/workspace/CrewGuru/crewguru-web-ng2/node_modules/ng2-img-cropper/src/imageCropperComponent.d.ts to a higher module that imports ImageCropperModule in /Users/gordon/workspace/CrewGuru/crewguru-web-ng2/node_modules/ng2-img-cropper/src/imageCropperModule.d.ts and AppModule in /Users/gordon/workspace/CrewGuru/crewguru-web-ng2/src/app/app.module.ts. You can also create a new NgModule that exports and includes ImageCropperComponent in /Users/gordon/workspace/CrewGuru/crewguru-web-ng2/node_modules/ng2-img-cropper/src/imageCropperComponent.d.ts then import that NgModule in ImageCropperModule in /Users/gordon/workspace/CrewGuru/crewguru-web-ng2/node_modules/ng2-img-cropper/src/imageCropperModule.d.ts and AppModule in /Users/gordon/workspace/CrewGuru/crewguru-web-ng2/src/app/app.module.ts.

from angular2-img-cropper.

IlmaZahil avatar IlmaZahil commented on August 12, 2024

hello, I uploaded the image in the image cropper. after refreshing the page the image in the cropper disappear. there will be a default link for that. but I want to load my uploaded image in the image cropper until I input another image file in the image cropper. hope to get a solution as soon as possible.

from angular2-img-cropper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.