Using the Camera

Hi!

In Alpha 32, I could use the camera by importing it like this.

import {Camera} from 'ionic/ionic';

But now in Alpha 35 Camera is undefined.

When comparing the ionic source code (in the src/typescript/platform folder) all the plugins are missing in Alpha 35.

So how can I the Camera now?

Best regards,
Erik

You’re correct, they have been removed. The Ionic team are working on something for plugins, but for now you’ll just have to use plain old PhoneGap / Cordova syntax: https://github.com/apache/cordova-plugin-camera

2 Likes

Thanks!

Got it to work quite easily by copying the code from Alpha-32 into a new class and just removing some unnecessary parts.