'How can i set the displayProp of a options in AngularJS to be a combination of strings?

How can I set the display text for my drop down to b a combination of my ItemText and ItemValue

I have the cshtml as

              <div id="myObj"
                         ng-dropdown-multiselect=""
                         selected-model="myObj"
                         extra-settings="myObjSettings"
                         options="myObjList"
                         translation-texts="myObjCustomText"
                         ng-dropdown-multiselect-disabled="myObjDisabled"
                         events="myObjtEvents"></div>
                </div>
                

and the javascript as

     $scope.myObjSettings = {
        enableSearch: true,
        scrollable: true,
        scrollableHeight: '300px',
        smartButtonMaxItems: 1,
        selectionLimit: 1,
        externalIdProp: '',
        displayProp: 'ItemText' + ' ' + 'ItemValue' , <--- that doesnt work 
        idProp: 'ItemValue',
        showCheckAll: false,
        showUncheckAll: false,
        closeOnSelect: true
    };

Is there a way I can do this ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source