2017-04-24 33 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