     require:     "ngModel"
 
     link: ($scope, element, attrs, ctrl, transclude) ->
-      labelKey = attrs.macAutocompleteLabel  or "name"
-      queryKey = attrs.macAutocompleteQuery  or "q"
+      labelKey    = attrs.macAutocompleteLabel or "name"
+      labelGetter = $parse labelKey
+
+      queryKey = attrs.macAutocompleteQuery or "q"
       delay    = +(attrs.macAutocompleteDelay or 800)
       inside   = attrs.macAutocompleteInside?
 

      @param {Array} data Array of data
      ###
      updateItem = (data = []) ->
        if data.length > 0
          currentAutocomplete = data

          $menuScope.items = data.map (item) ->
            if angular.isObject item
              itemGetter = $parse labelKey

              item.value ?= itemGetter(item) or ""
              item.label ?= itemGetter(item) or ""
              item

            else

            timeoutId = $timeout ->
              queryData value
            , delay

          else if isMenuAppended
            queryData value

        else
          reset()

