2016-06-15 4 views
2

私は、座席を記述するオブジェクトの配列を持っています。
各座席のオブジェクトは、次のようになりますng-optionsのエラー反復

ID: 1 
platz: 1 
status: 1 
title: "Sitzplatz #1" 
userID: 1 

は今、私はこのような私のオブジェクトの配列を反復するNG-オプションとAngularJSを使用:

<select ng-options="s.status for s in seating"></select> 

をしかし、私はエラーを得た:

Error: [$compile:ctreq] http://errors.angularjs.org/1.5.0/$compile/ctreq?p0=ngModel&p1=ngOptions 
    at Error (native) 
    at http://localhost/netconnect-4.0/assets/scripts/vendor/angular.min.js:6:416 
    at s (http://localhost/netconnect-4.0/assets/scripts/vendor/angular.min.js:63:198) 
    at s (http://localhost/netconnect-4.0/assets/scripts/vendor/angular.min.js:63:265) 
    at u (http://localhost/netconnect-4.0/assets/scripts/vendor/angular.min.js:66:175) 
    at g (http://localhost/netconnect-4.0/assets/scripts/vendor/angular.min.js:58:136) 
    at g (http://localhost/netconnect-4.0/assets/scripts/vendor/angular.min.js:58:153) 
    at g (http://localhost/netconnect-4.0/assets/scripts/vendor/angular.min.js:58:153) 
    at g (http://localhost/netconnect-4.0/assets/scripts/vendor/angular.min.js:58:153) 
    at g (http://localhost/netconnect-4.0/assets/scripts/vendor/angular.min.js:58:153) <div ng-include="'app/shared/modals/adminEditorSeating.html'" class="ng-scope"> 

答えて

2

あなたはNG-オプションを使用している時はいつでもNG-モデルを使用する必要があります。

+0

THXを、試してみてください –

0

よく働くこの

<select ng-model="modelname" ng-options="s.status for s in seating"></select>