2017-04-24 30 views
0

我正在使用angular和Bootstrap for angular(angular UI),並且當我打開模式(單擊編輯列表)並選擇要編輯的國家/地區時,讓我說改變一個國家的名字,我沒有看到它反映在模態控制器的模型中。所以這個值不會更新:$ ctrl.Country。無法使用Angular UI和Modal更新模型

因爲我使用duoble在輸入文本結合我迷路:{{$ ctrl.Country.Name}}

這是我Plunker

<a href="https://plnkr.co/edit/5JHKpdmLMVBFlmL22SGC?p=preview">Plunker</a> 

感謝

回答

0

嘗試這plunkr其中一些錯誤是固定的:

  1. <input type="text" class="form-control" ng-model="$ctrl.Country.Code"><input type="text" class="form-control" ng-model="$ctrl.Country.Code">ng-model,而不是value
  2. $ctrl.Save加入:

  3. modalInstance.result.then:邏輯是固定

+0

它工作很好,非常感謝! – MarcosF8