Closed gabrielrojasp closed 7 years ago
Please check #126 - let me know if the solution work for you.
Thanks! ... yes it works
In my case in SharedModule
import {ImageCropperModule} from 'ng2-img-cropper/index';
@NgModule({ imports:[ ImageCropperModule, ], declarations: [
], exports:[ ImageCropperModule, ] }) export class SharedModule { }
After this, it works well
Regards
Fixed in 0.8.4 < added exports into the module
(Api keys should be hidden
AgmCoreModule.forRoot({ apiKey: 'xxx' }),
)
@kinoxhio
@terravibe thanks !!
how would u hide the api keys?
@vikramkalta I wrote in the example
@kinoxhio thanks man
in my case the issue was silly, i was declaring ImageCropperComponent in more than 2 places, where as I should have just imported ImageCropperModule wherever I am using it. (just started exploring power of angular)
Hi,
Can you help me?. I had similar problem when try ng build --prod
I had in module implement
import {ImageCropperComponent, CropperSettings, Bounds } from 'ng2-img-cropper';
@Component({ selector: 'app-user-promotion-create-edit', templateUrl: './user-promotion-create-edit.component.html', styleUrls: ['./user-promotion-create-edit.component.css'], providers: [CommerceService, CategoriesService, PromotionService], animations: [moveIn(), fallIn(), moveInLeft()], host: {'[@moveIn]': ''} }) export class UserPromotionCreateEditComponent implements OnInit, AfterViewChecked { @ViewChild('cropper', undefined) cropper: ImageCropperComponent;
// IMAGE public data: any; public name: string; public cropperSettings: CropperSettings;
==============================================
in shared module had:
import {ImageCropperComponent} from 'ng2-img-cropper'; @NgModule({ imports:[ CommonModule, RouterModule, ReactiveFormsModule, // ImageCropperComponent, AgmCoreModule.forRoot({ apiKey: 'xxxxxxxxx' }), LocalStorageModule.withConfig({ prefix: 'name', storageType: 'localStorage' }) ], declarations: [
], exports:[
],
this works fine, but the problem is when try to ng build --prod
Sorry, my english is not good
I appreciate any advice!