0
votes

I am using angular and Bootstrap for angular (angular UI), and when I open the modal (click on Edit List) and the select a country to Edit, let say I change the name of a country, I don't see it reflected in the model of the modal controller. So this value is not updated: $ctrl.Country.

I am getting lost as I am using duoble binding in the input text: {{$ctrl.Country.Name}}

This is my Plunker

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

Thanks

1

1 Answers

0
votes

Try this plunkr where some mistakes were fixed:

  1. <input type="text" class="form-control" ng-model="$ctrl.Country.Code"> and <input type="text" class="form-control" ng-model="$ctrl.Country.Code">: ng-model instead of value
  2. $ctrl.Save was added:

  3. modalInstance.result.then: logic was fixed