code: function getItemAsNameVal (item) {
      if (!item) {
        return undefined;
      }
  
      var locals = {};
      if (ctrl.itemName) {
        locals[ ctrl.itemName ] = item;
      }
  
      return locals;
    }
docs: Returns the locals object for compiling item templates.
  @param item
  @returns {Object|undefined}