Can't get camera plugin working

I’m running iOS 8 on my iPhone 6 and want to use the Camera plugin for Ionic. I did the same thing, following

The camera starts and I can take a picture and click ‘Use Photo’ but then I get this error:

Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.

This is the additional code to take a picture. I allowed access in config.xml.

$scope.getPhoto = function() {
            Camera.getPicture().then(function(imageURI) {
                                     $scope.lastPhoto = imageURI;
                                     }, function(err) {
                                     }, {
                                     quality : 75,
                                     destinationType : Camera.DestinationType.FILE_URI,
                                     sourceType : Camera.PictureSourceType.CAMERA,
                                     allowEdit : false,
                                     encodingType: Camera.EncodingType.JPEG,
                                     targetWidth: 100,
                                     targetHeight: 100,
                                     saveToPhotoAlbum: true

I tried to update the ios platform (, maybe that’s the cause, but then I get this:

throw err;
Error: Cannot find module 'shelljs’
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/Users/thomasvanommeslaeger/.cordova/lib/npm_cache/cordova-ios/3.7.0/package/bin/update:21:13)
at Module._compile (module.js:456:26)
at Object.Module._extensions…js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
Error: /Users/thomasvanommeslaeger/.cordova/lib/npm_cache/cordova-ios/3.7.0/package/bin/update: Command failed with exit code 8
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)

Hey Mate,

Don’t worry about creating your own. You should check out ngCordova

The code I used that was written in the blog doesn’t work (, I need to put my CameraOptions in my services and not make them in my controller and pass them through.