Observed since 20 Oct, 19:15 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
2mundos-angular-cropperjs
CropperJS integration for Angular 2/4
CropperJS integration for Angular 2/4
1- Install the library:
$ npm install angular-cropperjs --save
2- Import and load AngularCropperjsModule in the module you want to use, for example AppModule:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
//
// Import angular-cropperjs
import { AngularCropperjsModule } from 'angular-cropperjs';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
//
// Load angular-cropperjs
AngularCropperjsModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
3- Use the component in your template like this:
<!-- You can now use angular-cropper component in app.component.html -->
<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
<angular-cropper #angularCropper ..>
And in your app.component.ts
//
// Import AngularCropperjsComponent
import { AngularCropperjsComponent } from 'angular-cropperjs';
//
// Get with @ViewChild
@ViewChild('angularCropper') public angularCropper: AngularCropperjsComponent;
Then just call the CropperJS method you want:
anywhere in your app.component.ts
//
// Lets try to zoom
this.angularCropper.cropper.zoom(0.1);
To generate all *.js, *.d.ts and *.metadata.json files:
$ npm run build
To lint all *.ts files:
$ npm run lint
MIT © Matheus Davidson
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
2mundos-fengyuanchen-cropperjsEnvironment{
"local_name": "2mundos-fengyuanchen-cropperjs",
"alias": false,
"peer_metadata": null
} | ^1.2.2-2m.0.0 | runtime |
@types/cropperjsEnvironment{
"local_name": "@types/cropperjs",
"alias": false,
"peer_metadata": null
} | 0.0.26 | development |
@angular/coreEnvironment{
"local_name": "@angular/core",
"alias": false,
"peer_metadata": null
} | ^4.0.0 | peer |
rxjsEnvironment{
"local_name": "rxjs",
"alias": false,
"peer_metadata": null
} | ^5.1.0 | peer |
zone.jsEnvironment{
"local_name": "zone.js",
"alias": false,
"peer_metadata": null
} | ^0.8.4 | peer |
Source distribution
{
"integrity": "sha512-fis7UGJ8rLSYu3AH3k6JEsW6Sa/D6Io4HVmDRUEtPqSmZ40y+XJzld31rsWDcZLPkwtugGO0oAnBBeZKv3V8qg==",
"shasum": "67ea2685d6bec443a01a631683b630900b359b6e",
"tarball": "https://registry.npmjs.org/2mundos-angular-cropperjs/-/2mundos-angular-cropperjs-0.1.5-2m.0.0.tgz",
"fileCount": 8,
"unpackedSize": 32755,
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbMwqXCRA9TVsSAnZWagAAKHgP/0lw4PauM+BvVx/kzrqT\nSQdmmUwfswvjKlaCasb+kaPxU6VsE8YgaT79NB2ZDyT8/AiBHidq/Veft9u7\nl6TT/9/aNd7KrUOtO+xkiur6NQAdH73Mr9Erc4Y7UkPl4beUbEb2/EG5Z9Nv\n+ehIs1fTj+oSJr7P99jDBObCWUaFdQ+RLDApZBKrNSwwVnkbyFc8WzuzUrqA\ny6ZEqjXaybiqQ9tBw5dw2YsmkCcOSQdp8nojpeZDvQkoTeCumseCqUjn1+MQ\nr8ZitHF88VR/YMyrZmas/1PSNhfR23SemoexP7NElKxFQQVH4jT3grk5C4pJ\nfNgQ1EC5XovqLpeEi5d7tXmHZyxeVIb+LmVnMEBPOqOAWFnMm/Rd5s9ye0U9\npVOmRzMgmOklS0d4cAHMzbf6P4d9X6Bjmmf/af8ZTX0F1+bmhNQm6nWsQEAD\nSAMRW0K4Bjpw8QnewfqcOygommdO+uD7dz0SZzo6jdzPOW0cTA7aBqwMjRSS\ndCQzEtqf+76ki3sl7sVOq3DSRZHADK7+rVwaqU7UkrUjK+GYeiTKYsaRAMd7\nu8pQZJKPLQMFqU/xlgz20gYQLvDgesdspnSoWr2hDVAtJIwD5PkQhtIMPS/a\nZ5iCUGZvApnasFt8ofvWWAr+tUqWzPz1A+SxHih6Dvr6ccbwwXdGayuBdChO\nK80L\r\n=FZAz\r\n-----END PGP SIGNATURE-----\r\n",
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEUCIAiDHx+4kfLLyj/V9KMFk3Jx1qwF+qDr770ibnI83nrNAiEAgfLhNvvJea4L7iPWZRJEZKw0MLRcOM661de8x4zOSqE="
}
]
}Shared repository data · GitHub
Observed since 20 Oct, 19:15 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:b1c856d09763b87bec8ec615e98e90005e9ef8ac3ca98e9529cd719e55c24921