nightr/client/Nightr/src/app/component/camera-button/camera-button.component.ts
2019-04-07 01:27:48 +02:00

25 lines
543 B
TypeScript

import { Component, OnInit } from '@angular/core';
import { MyCameraService } from '../../services/my-camera-service';
@Component({
selector: 'ns-camera-button',
templateUrl: './camera-button.component.html',
styleUrls: ['./camera-button.component.css'],
moduleId: module.id,
})
export class CameraButtonComponent implements OnInit {
camera:MyCameraService = new MyCameraService();
constructor() { }
ngOnInit() {
}
onTap() {
this.camera.takePicture().then(
(res) => {console.log(res)}, () => {}
);
}
}