title: angularjs gives 'undefined' for hidden field with php session variable as value
body: <p>I have found a lot or resources on how to pass a hidden input field value to an angularjs script, but not if that value is being read from a php session.</p>
  
  <p>This is my html code:</p>
  
  <pre><code>    &lt;div ng-controller="ImgCtrl"&gt;
        &lt;input type="hidden" ng-model="uid" value="&lt;?=$_SESSION["uid"];?&gt;" &gt;
        &lt;input type="file" ng-file-select="onFileSelect($files)" &gt;
        &lt;br/&gt;
        &lt;span&gt;{{ message }}&lt;/span&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>I have also tried it as this:</p>
  
  <pre><code>    &lt;input type="hidden" ng-model="uid" value="{{&lt;?=$_SESSION["uid"];?&gt;}}" &gt;
  </code></pre>
  
  <p><strong>EDIT</strong>
  The angularjs code that will handle it is:</p>
  
  <pre><code>var ImgCtrl = [ '$scope', '$upload', function($scope, $upload) {
    $scope.onFileSelect = function($files) {
      for (var i = 0; i &lt; $files.length; i++) {
        var file = $files[i];
        $scope.upload = $upload.upload({
          url: 'image_upload.php', 
          method: 'POST',
          data: {
              'uid': $scope.uid
          },
          file: file
        }).success(function(data, status, headers, config) {
          $scope.message = data;
        }).error(function(data, status) {
           alert(data);
        });
      }
    };
  }];
  </code></pre>
  
  <p>Which was one of the answers I found, but I can not seem to find how to read a php session variable in angularjs.</p>
  
  <p>Anyone have an idea?</p>
  
  <p>Thanks!</p>