Опция выбора заказа со значением ключа по ключу - PullRequest
0 голосов
/ 21 февраля 2019

Я пытаюсь упорядочить мой список в алфавитном порядке по ключу, и у меня проблемы с этим.я пытался добавить "| orderBy 'key'", НО ЭТО НЕ РАБОТАЕТ, ЛЮБОЕ ПРЕДЛОЖЕНИЕ?мой HTML:

<label for="select-aspects" class="col-lg-1 col-md-1 col-sm-1 control-label">UMS:</label>
              <div class="col-lg-5 col-md-5 col-sm-5">
                <select data-smart-select2
                        multiple
                        data-ng-options="key as key for (key, value) in vm.umsAspects "
                        data-ng-disabled="!vm.currentProduct.adoptedListings[vm.currentListingPosition].agentDecisionContract.action || vm.currentProduct.adoptedListings[vm.currentListingPosition].agentDecisionContract.reason!='Aspects'"
                        ng-required="vm.currentProduct.adoptedListings[vm.currentListingPosition].agentDecisionContract.reason=='Aspects'"
                        style="width: 100%;"
                        ng-model="vm.currentProduct.adoptedListings[vm.currentListingPosition].agentDecisionContract.reasonAspects"
                        class="select2"
                        id="select-aspects">
                </select>
              </div>

мой список выглядит следующим образом:

{Бренд: {umsValues: Array (543), multiValue: true, aspectRequired: true}, UPC: {umsValues: Array (543), multiValue: true, aspectRequired: true} Модель: {umsValues: Array (543), multiValue: true, aspectRequired: true}, Тип: {umsValues: Array (543), multiValue: true, aspectRequired:true}}

, в этом случае я хочу отобразить его в следующем порядке: Марка Модель Тип UPC

...