text: 'use strict';
  angular.module('main')
  .service('Main', function ($log, $timeout) {
  
    $log.log('Hello from your Service: Main in module main');
  
    // some initial data
    this.someData = {
      binding: 'Yes! Got that databinding working'
    };
  
    this.changeBriefly = function () {
      var initialValue = this.someData.binding;
      this.someData.binding = 'Yeah this was changed';
  
      var that = this;
      $timeout(function () {
        that.someData.binding = initialValue;
      }, 500);
    };
  
  })
  .factory('Camera', function ($q) {
  
    return {
      getPicture: function (options) {
        var q = $q.defer();
  
        navigator.camera.getPicture(function (result) {
          q.resolve(result);
        }, function (err) {
          q.reject(err);
        }, options);
  
        return q.promise;
      }
    };
  
  });
  