Hello! I modified your directive as such but when i use it to choose a value, then change to another view, and come back to it : I see [object Object] instead of the chosen value. I think it has to do with the line : scope.ngValue = scope.ngValue !== undefined ? scope.ngValue : "item"; How can I tell it to display the sub-object (in your example : nmPlaca) whose name is passed in labelField?

I tried item[labelField] and “item[labelField]”… I will make a codepen tomorrow to illustrate this problem… it’s to late now… Tell me if you understand a bit what I mean! thanks !

@tamang: I ran into the same issue. It may be way too late to help you, or you might have figured it out already, but to others who are experiencing the same problem hopefully this will help. The first child of the selectContainer div must be a div, not a label. You can leave the same classes associated with the label to give the div the same look. The properties of the label element override the button ng-click method.

@tamang: In my testing I actually updated the ng-click function to be “open_list()” instead of “open()”. Double-check that, and either change the function in the directive, or in the ng-click. Hope that helps.