Angularjs 角度-引导模式内ng重复-如何更新主作用域上的数据?

Angularjs 角度-引导模式内ng重复-如何更新主作用域上的数据?,angularjs,angularjs-scope,angular-ui,angular-ui-bootstrap,Angularjs,Angularjs Scope,Angular Ui,Angular Ui Bootstrap,我使用ng repeat显示一个表格,该表格包含一个“编辑”按钮,可打开一个模式。在模式中更新数据后,我不知道如何将模式范围数据返回到用于生成表的主范围数据 基本上,我希望能够使用来自modal的数据来更新主ng repeat表 以下是关闭模式时执行的功能: $scope.customer = customer; $scope.ok = function (customer) { $modalInstance.close($scope.customer);

我使用ng repeat显示一个表格,该表格包含一个“编辑”按钮,可打开一个模式。在模式中更新数据后,我不知道如何将模式范围数据返回到用于生成表的主范围数据

基本上,我希望能够使用来自modal的数据来更新主ng repeat表

以下是关闭模式时执行的功能:

$scope.customer = customer;

   $scope.ok = function (customer) {

      $modalInstance.close($scope.customer);
                    };

});
在我的示例中,您可以看到“customer.details”在模式中更新时没有更新


提前感谢您的帮助。

如果您使用的是
ng model
而不是
ng model
,它会工作的


我编辑了你的

嗨,乔伊,谢谢你的快速回复,但我觉得你链接的小提琴似乎没有你的零钱(或者至少我找不到)。只是为了确保我对我要做的事情特别清楚,当模式关闭时,输入到模式中的文本应该更新相应编辑按钮旁边的文本。太棒了,真不敢相信我在这样一个简单的错误上浪费了这么多时间!非常感谢。