title: Add $$hashKey to object in Angular
body: <p>The Angular-specific property on enumerated objects <code>$$hashKey</code>can be used for a lot of things.</p>
  
  <p>For example DOM-targeting;</p>
  
  <pre><code>&lt;div ng-repeat="obj in objects"&gt;
      &lt;label for="field-{{obj.$$hashKey}}"&gt;
          Label
      &lt;/label&gt;
      &lt;input type="text" id="field-{{obj.$$hashKey}}" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In some weird case I am experiencing now the $$hashKey prop is not yet set on a object I want to access it on even though it is being repeated with Angular.
  Is there a way to set this property yourself when initializing the object?</p>
  
  <p>Edit: My guess is that there is some form of execution order issue, that I access the property when Angular has yet to process the repetition.
  I am deep watching an object, within that object is an array with objects which is getting repeated. It's also on one of those objects that I need to access the <code>$$hashKey</code> property on.</p>
  
  <p>Simple example;</p>
  
  <pre><code>var MyController = function($scope, Obj)
  {
      $scope.obj = {
          list: [obj, obj, obj, obj]
      };
  
      $scope.$watch("obj", function()
      {
          var lastObj = $scope.obj.list[$scope.obj.list.length - 1];
          console.log(lastObj.$$hashKey); // Undefined?
      }, true);
  
      $scope.addObj = function()
      {
          $scope.obj.list.push(new Obj());
      };
  };
  </code></pre>
  
  <p>Edit2: jsFiddle <a href="http://jsfiddle.net/2sbWp/2/" rel="noreferrer">http://jsfiddle.net/2sbWp/2/</a></p>