Catalog npm
Back to packageRELEASE DETAILS

0.1.5-2m.0.0

npm

2mundos-angular-cropperjs

CropperJS integration for Angular 2/4

angularangular-componentangular-libraryangular2angular4croppercropperjsimage
Published27 Jun 2018
Direct dependencies5
Transitive dependenciesNot calculated

README

Current package documentation

angular-cropperjs

CropperJS integration for Angular 2/4

How to use

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);

Development

To generate all *.js, *.d.ts and *.metadata.json files:

$ npm run build

To lint all *.ts files:

$ npm run lint

License

MIT © Matheus Davidson

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 5

Native requirements
5 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
2mundos-fengyuanchen-cropperjs
Environment
{
  "local_name": "2mundos-fengyuanchen-cropperjs",
  "alias": false,
  "peer_metadata": null
}
^1.2.2-2m.0.0runtime
@types/cropperjs
Environment
{
  "local_name": "@types/cropperjs",
  "alias": false,
  "peer_metadata": null
}
0.0.26development
@angular/core
Environment
{
  "local_name": "@angular/core",
  "alias": false,
  "peer_metadata": null
}
^4.0.0peer
rxjs
Environment
{
  "local_name": "rxjs",
  "alias": false,
  "peer_metadata": null
}
^5.1.0peer
zone.js
Environment
{
  "local_name": "zone.js",
  "alias": false,
  "peer_metadata": null
}
^0.8.4peer

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "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="
    }
  ]
}

Repository

PENDING
matheusdavidson/angular-cropperjs

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:15 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:b1c856d09763b87bec8ec615e98e90005e9ef8ac3ca98e9529cd719e55c24921

Other collected versions

View all collected versions →