title: angularjs chaining promises not working , and angular.copy is not either
body: <p>So my understanding is that i can loop over my FIRST returned set of objects </p>
  
  <p><strong>Object =   vm.liberty</strong></p>
  
  <p>Loop</p>
  
  <pre><code>vm.liberty.forEach(function (obj) {
  </code></pre>
  
  <p>My understanding of this  <code>obj</code> is that it is a reference and thus the <code>vm.liberty</code> object will get updated.... right?</p>
  
  <p>I know that <code>console.log</code> is not reliable as it spits out results as soon as line it hit </p>
  
  <p>However    </p>
  
  <pre><code>     console.log('obj', obj);
  </code></pre>
  
  <p>That contains the DATA that i want,  I have added in a extended nested object to each record in the object ....</p>
  
  <p>But someone either i'm not doing promise chaining correctly or something else </p>
  
  <p>I even try to do a <code>angular.copy</code> </p>
  
  <pre><code>vm.liberty2 = angular.copy(vm.liberty);
  </code></pre>
  
  <p>That does not work , as <code>console.log(vm.liberty);</code> seems to be empty</p>
  
  <p>Here is my function:</p>
  
  <pre><code>    var loadLiberty = function () {
  
          var promise1 = libertyService.getLibertyQuestions();
          promise1.then(function (response) {
              vm.liberty = response;
          }).then(function (res) {
              vm.liberty.forEach(function (obj) {
                  promise2 = libertyService.getDirectives(obj.QuestionId)
                      .then(function (result) {
                          obj.directives = result;
                          console.log('obj', obj);
                          //vm.liberty.directives = result;
  
  
                      }, function (err) {
                          console.log('err', err);
                      });
  
              });
  
          });
          //vm.liberty2 = angular.copy(vm.liberty);
          console.log(vm.liberty);
          vm.liberty2 = angular.copy(vm.liberty);
          //return promise1;
      };
  </code></pre>
  
  <p><strong>Thoughts or suggestions ?</strong></p>