Oke, so I realized everything about setting config.xml correctly!
Ionic Phonegap Build
1. NodeJS c9.io(Cloud Environment) NodeJs.
2. Ionic (: )
npm install -g cordova ionic
ionic start myApp tabs
2a. cd myApp
2b. , ( )
cordova plugin add org.apache.cordova.camera
3. cd www
4. Bower Unzip ngCordova /lib
bower install ngCordova
5. ngCordova index.html
index.html
<script src="lib/ngCordova/dist/ng-cordova.js"></script>
<script src="cordova.js"></script>
6. app.js 'ngCordova'
angular.module('starter', ['ionic', 'starter.controllers', 'starter.services', 'ngCordova'])
7.
.controller("ExampleCtrl", function($scope, $cordovaCamera) {
$scope.takePicture = function() {
var options = {
quality : 75,
destinationType : Camera.DestinationType.DATA_URL,
sourceType : Camera.PictureSourceType.CAMERA,
allowEdit : true,
encodingType: Camera.EncodingType.JPEG,
targetWidth: 300,
targetHeight: 300,
popoverOptions: CameraPopoverOptions,
saveToPhotoAlbum: false
};
$cordovaCamera.getPicture(options).then(function(imageData) {
$scope.imgURI = "data:image/jpeg;base64," + imageData;
}, function(err) {
});
}
});
8. .html( tab.example ExampleCtrl app.js)
<ion-view view-title="Example">
<ion-content>
<img ng-show="imgURI !== undefined" ng-src="{{imgURI}}">
<img ng-show="imgURI === undefined" ng-src="http://placehold.it/300x300">
<button class="button" ng-click="takePicture()">Take Picture</button>
</ion-content>
</ion-view>
9. config.xml. :
https://github.com/phonegap/phonegap-start/blob/master/www/config.xml