title: angularjs value vs factory
body: <p>I am new to angularjs. I am trying to find out when to use value vs factory as a service. Here is my simple code from egghead.io tutorial:</p>
  
  <pre><code>.value('Data', function(){
      return {message:"I am data from a service"};
    })
  </code></pre>
  
  <p>The Data.message is bound to an input field. When I start the page, there is nothing in the input fields. If I change value to factory, the default message appears in the input field.</p>
  
  <p>Here is the contoller:</p>
  
  <pre><code>controller('FirstCtrl', ['$scope','Data',function($scope, Data) {
      $scope.data = Data;
      console.log('exiting first controller');
    }])
  </code></pre>
  
  <p>and the index file:</p>
  
  <pre><code>&lt;div ng-controller="FirstCtrl"&gt;
     &lt;input type="text" ng-model="data.message"&gt;
     &lt;h1&gt;{{data.message}}&lt;/h1&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Why is the page blank when using value? My assumption is that value is not calculated or computed when the app starts whereas factory is?</p>
  
  <p>Also, where can I find some documentation on $provide? Thank you all.</p>