Camera ionic 3 framework

#1

Could somebody explane me how to implement a camera in my App?
I use Ionic 3 in VS Code.

1 Like
Cannot understand "Can't resolve all parameters for page" Ionic 3 + Firebase
#2

You can use the cordova-plugin-camera. Refer to this demo https://www.freakyjolly.com/use-native-device-camera-ionic-3-application/#more-1274 :blush:

#3

Thank you I did it like this but it still gives me errors. For example in the app.module.ts when i add ‘Camera’ in the ‘providers’ section its an error
import { NgModule, ErrorHandler } from ‘@angular/core’;
import { BrowserModule } from ‘@angular/platform-browser’;
import { IonicApp, IonicModule, IonicErrorHandler } from ‘ionic-angular’;
import { MyApp } from ‘./app.component’;

import { StatusBar } from ‘@ionic-native/status-bar’;
import { SplashScreen } from ‘@ionic-native/splash-screen’;
import { Camera } from ‘@ionic-native/camera’;
import { AboutPage } from ‘…/pages/about/about’;
import { ContactPage } from ‘…/pages/contact/contact’;
import { HomePage } from ‘…/pages/home/home’;
import { TabsPage } from ‘…/pages/tabs/tabs’;

@NgModule({
declarations: [
MyApp,
AboutPage,
ContactPage,
HomePage,
TabsPage
],
imports: [
BrowserModule,
IonicModule.forRoot(MyApp)
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
AboutPage,
ContactPage,
HomePage,
TabsPage
],
providers: [

StatusBar,
SplashScreen,
Camera, //<-- Error ?????
{provide: ErrorHandler, useClass: IonicErrorHandler}

]
})
export class AppModule {}

1 Like
#4
 "npm install --save @ionic-native/camera@4", now u need to install version 4.x.x for all plugins, sorry my english is bad.
1 Like
#5

It worked! Thank you :smile:

1 Like