Gathering detailed insights and metrics for angular-cropperjs
Gathering detailed insights and metrics for angular-cropperjs
Gathering detailed insights and metrics for angular-cropperjs
Gathering detailed insights and metrics for angular-cropperjs
npm install angular-cropperjs
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
109 Stars
62 Commits
68 Forks
7 Watching
6 Branches
5 Contributors
Updated on 24 Aug 2024
Minified
Minified + Gzipped
TypeScript (56.57%)
CSS (20.26%)
HTML (11.87%)
JavaScript (8.66%)
Shell (2.63%)
Cumulative downloads
Total Downloads
Last day
-5.6%
1,281
Compared to previous day
Last week
4.6%
6,331
Compared to previous week
Last month
23.6%
26,336
Compared to previous month
Last year
26.6%
258,854
Compared to previous year
1
3
CropperJS integration for Angular
https://matheusdavidson.github.io/angular-cropperjs/
1- Install the library:
1$ npm install angular-cropperjs --save
2- Import and load AngularCropperjsModule
in the module you want to use, for example AppModule
:
1import { BrowserModule } from '@angular/platform-browser'; 2import { NgModule } from '@angular/core'; 3 4import { AppComponent } from './app.component'; 5 6// 7// Import angular-cropperjs 8import { AngularCropperjsModule } from 'angular-cropperjs'; 9 10@NgModule({ 11 declarations: [AppComponent], 12 imports: [ 13 BrowserModule, 14 15 // 16 // Load angular-cropperjs 17 AngularCropperjsModule 18 ], 19 providers: [], 20 bootstrap: [AppComponent] 21}) 22export class AppModule {}
3- Use the component in your template like this:
1<!-- You can now use angular-cropper component in app.component.html --> 2<angular-cropper [cropperOptions]="config" [imageUrl]="imageUrl"></angular-cropper>
Using CropperJS methods:
Use @ViewChild in your component to get the element:
In your app.component.html
1<angular-cropper #angularCropper ..></angular-cropper>
And in your app.component.ts
1 2// 3// Import CropperComponent 4import { CropperComponent } from 'angular-cropperjs'; 5 6// 7// Get with @ViewChild 8@ViewChild('angularCropper') public angularCropper: CropperComponent;
Then just call the CropperJS method you want:
anywhere in your app.component.ts
1// 2// Lets try to zoom 3this.angularCropper.cropper.zoom(0.1);
This project was generated with Angular CLI version 6.0.8.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.
MIT © Matheus Davidson
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
30 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More