How it works...

Camera.getPicture() is just an abstraction of navigator.camera.getPicture() from the Cordova camera plugin. If you are already familiar with Cordova or ngCordova from Ionic 1, this should be very familiar. Let's start with the template. You have the following two buttons, which trigger the same, getPicture(), method:

<button ion-buton (click)="getPicture(1)">Show Camera</button><button ion-buton (click)="getPicture(1)">Show Camera</button>

These are just different ways to access photos: either from the camera itself or from the existing photos in the phone's album. For the photo to render, you need to pass the photo data into the src attribute, as follows:

<img [src]="imageData" *ngIf="imageData" /> 

Note that you only want ...

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.12.157