{"id":13808655,"url":"https://github.com/matheusdavidson/angular-cropperjs","last_synced_at":"2025-04-05T08:05:36.345Z","repository":{"id":25216247,"uuid":"103444689","full_name":"matheusdavidson/angular-cropperjs","owner":"matheusdavidson","description":"CropperJS integration for Angular +6","archived":false,"fork":false,"pushed_at":"2023-12-01T03:25:48.000Z","size":2292,"stargazers_count":109,"open_issues_count":32,"forks_count":67,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-29T18:03:29.390Z","etag":null,"topics":["angular","angular-component","angular-library","angular2","angular4","cropper","cropperjs","image"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matheusdavidson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-13T20:00:09.000Z","updated_at":"2024-08-24T09:03:40.000Z","dependencies_parsed_at":"2024-06-03T13:48:54.069Z","dependency_job_id":"f2acb119-671d-4704-9b0f-61a9d003a2b4","html_url":"https://github.com/matheusdavidson/angular-cropperjs","commit_stats":{"total_commits":29,"total_committers":5,"mean_commits":5.8,"dds":0.1724137931034483,"last_synced_commit":"fffbadb42713acbb9016899990e8be1ba9adc418"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheusdavidson%2Fangular-cropperjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheusdavidson%2Fangular-cropperjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheusdavidson%2Fangular-cropperjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheusdavidson%2Fangular-cropperjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matheusdavidson","download_url":"https://codeload.github.com/matheusdavidson/angular-cropperjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305933,"owners_count":20917208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular-component","angular-library","angular2","angular4","cropper","cropperjs","image"],"created_at":"2024-08-04T01:01:48.234Z","updated_at":"2025-04-05T08:05:36.326Z","avatar_url":"https://github.com/matheusdavidson.png","language":"TypeScript","readme":"# angular-cropperjs\n\n[CropperJS](https://fengyuanchen.github.io/cropperjs/) integration for Angular\n\n# Demo\n\nhttps://matheusdavidson.github.io/angular-cropperjs/\n\n## How to use\n\n1- Install the library:\n\n```bash\n$ npm install angular-cropperjs --save\n```\n\n2- Import and load `AngularCropperjsModule` in the module you want to use, for example `AppModule`:\n\n```typescript\nimport { BrowserModule } from '@angular/platform-browser';\nimport { NgModule } from '@angular/core';\n\nimport { AppComponent } from './app.component';\n\n//\n// Import angular-cropperjs\nimport { AngularCropperjsModule } from 'angular-cropperjs';\n\n@NgModule({\n    declarations: [AppComponent],\n    imports: [\n        BrowserModule,\n\n        //\n        // Load angular-cropperjs\n        AngularCropperjsModule\n    ],\n    providers: [],\n    bootstrap: [AppComponent]\n})\nexport class AppModule {}\n```\n\n3- Use the component in your template like this:\n\n```html\n\u003c!-- You can now use angular-cropper component in app.component.html --\u003e\n\u003cangular-cropper [cropperOptions]=\"config\" [imageUrl]=\"imageUrl\"\u003e\u003c/angular-cropper\u003e\n```\n\n**Using CropperJS methods:**\n\nUse @ViewChild in your component to get the element:\n\n_In your app.component.html_\n\n```html\n\u003cangular-cropper #angularCropper ..\u003e\u003c/angular-cropper\u003e\n```\n\n_And in your app.component.ts_\n\n```js\n\n//\n// Import CropperComponent\nimport { CropperComponent } from 'angular-cropperjs';\n\n//\n// Get with @ViewChild\n@ViewChild('angularCropper') public angularCropper: CropperComponent;\n```\n\nThen just call the CropperJS method you want:\n\n_anywhere in your app.component.ts_\n\n```js\n//\n// Lets try to zoom\nthis.angularCropper.cropper.zoom(0.1);\n```\n\n# Development\n\nThis project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.8.\n\n## Development server\n\nRun `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.\n\n## Code scaffolding\n\nRun `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.\n\n## Build\n\nRun `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.\n\n## Running unit tests\n\nRun `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).\n\n## Running end-to-end tests\n\nRun `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).\n\n## Further help\n\nTo get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).\n\n## License\n\nMIT © [Matheus Davidson](mailto:matheusdavidson@gmail.com)\n","funding_links":[],"categories":["Table of contents"],"sub_categories":["Third Party Components"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatheusdavidson%2Fangular-cropperjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatheusdavidson%2Fangular-cropperjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatheusdavidson%2Fangular-cropperjs/lists"}