第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

ng-model,ng-repeat和輸入有困難

ng-model,ng-repeat和輸入有困難

慕斯王 2019-08-16 14:04:51
ng-model,ng-repeat和輸入有困難我試圖允許用戶使用ngRepeat和編輯項目列表ngModel。(看到這個小提琴。)但是,我嘗試過的兩種方法都會導(dǎo)致奇怪的行為:一個不更新模型,另一個模糊每個keydown上的形式。我在這里做錯了嗎?這不是支持的用例嗎?以下是小提琴的代碼,為方便起見而復(fù)制:<html ng-app>     <head>         <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet">     </head>     <body ng-init="names = ['Sam', 'Harry', 'Sally']">         <h1>Fun with Fields and ngModel</h1>         <p>names: {{names}}</p>         <h3>Binding to each element directly:</h3>         <div ng-repeat="name in names">             Value: {{name}}            <input ng-model="name">                                  </div>         <p class="muted">The binding does not appear to be working: the value in the model is not changed.</p>         <h3>Indexing into the array:</h3>         <div ng-repeat="name in names">             Value: {{names[$index]}}            <input ng-model="names[$index]">                                  </div>         <p class="muted">Type one character, and the input field loses focus. However, the binding appears to be working correctly.</p>     </body></html>
查看完整描述

3 回答

  • 3 回答
  • 0 關(guān)注
  • 510 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號