2016-06-20 4 views
0

ng-repeatでの名前による並べ替えが正しくない理由がわかりません。順序が正しい出て起動しますが、その後、オランダが誤った順序で配置されます。名前による角度の並べ替えが正しくない

<div class="row"> 
    <div ng-if="region.checked && region.countCountries > 0" ng-repeat="region in vm.selectedRegions track by region.id" class="col-xs-12 col-sm-12 col-md-12 col-lg-12 padding-left-0"> 
    <strong class="region-title">{{ 'locales.region.' + region.name | translate }}</strong> 
    <div class="row"> 
     <div ng-if="($index == 0)" ng-repeat="country in region.countries track by $index" class="col-xs-6 col-sm-6 col-md-6 col-lg-6 padding-left-0"> 
     <div ng-if="country.selected && ($index < region.countries.length/2)" ng-repeat="country in region.countries | orderBy: 'name' track by country.id"> 
      <span class="fa fa-circle"></span> 
      <span translate="{{ 'locales.country.' + country.isoCode | translate }}"></span> 
     </div> 
     </div> 
     <div ng-if="($index == vm.Math.ceil(region.countries.length/2))" ng-repeat="country in region.countries track by $index" class="col-xs-6 col-sm-6 col-md-6 col-lg-6 padding-left-0"> 
     <div ng-if="country.selected && ($index >= region.countries.length/2)" ng-repeat="country in region.countries | orderBy: 'name' track by country.id"> 
      <span class="fa fa-circle"></span> 
      <span translate="{{ 'locales.country.' + country.isoCode | translate }}"></span> 
     </div> 
     </div> 
    </div> 
    </div> 
</div> 

オーストリア ベルギー ブルガリア デンマーク フィンランド フランス ドイツ ギリシャ アイルランド イスラエル イタリア オランダ ノルウェーハンガリーポーランド ポーランド ルーマニア スペイン スウェーデン スイス トルコ イギリス

+0

「オランダ」として名前が格納されていて、「isoCode」が「オランダ」として翻訳されている可能性がありますか? –

答えて

0

たぶん「オーストリアベルギーブルガリアデンマーク、フィンランド、フランス、ドイツ、ギリシャ、ハンガリー、アイルランド、イスラエル、イタリアは」中「オランダ、ノルウェー、ポーランド、ポルトガル、ルーマニア、スペイン、スウェーデン、スイス、トルコイギリス」あなたの最初のNG-の繰り返しであり、 2番目のng-repeat。

関連する問題