2015-09-07 41 views
0

我正在使用此代碼進行選擇:生成的角度未知標籤

爲什麼會生成此選項標籤?

<option value="? string:feminino ?"></option> 

當它只發生:

  1. 我從選擇
  2. 一個選項,我就與性別
  3. 然後刷新更新的URL。

HTML之前(試圖自動與URL上的選項中選擇):

<select id="gender" ng-model="genderMarked" ng-change="updateGender(genderMarked)" > 
          <option value="">Select a gender</option> 

          <option ng-value="collection.slug" ng-repeat="collection in collectionsGender">{{collection.title}}</option> 
         </select> 

的Html後:

 <select id="gender" ng-model="genderMarked" ng-change="updateGender(genderMarked)" class="ng-pristine ng-valid ng-touched"><option value="? string:feminino ?"></option> 
      <option value="? string:feminino ?"></option> 

      <option value="">Select a gender</option> 

      <option ng-value="collection.slug" ng-repeat="collection in collectionsGender" class="ng-binding ng-scope" value="masculino">Masculino</option> 

      <option ng-value="collection.slug" ng-repeat="collection in collectionsGender" class="ng-binding ng-scope" value="feminino">Feminino</option> 

      <option ng-value="collection.slug" ng-repeat="collection in collectionsGender" class="ng-binding ng-scope" value="infantil">Infantil</option> 
    </select> 

而且我越來越性別從URL已經標記(如果用戶刷新頁面)用此代碼:

 if($stateParams.genderSlug){ 
      $scope.genderMarked = $stateParams.genderSlug; 
     }else{ 
      $scope.genderMarked = ''; 
     } 
+0

爲什麼不'NG選項= 「collection.slug作爲collection.title用於收集collectionsGender」'的''