Javascript 角度UI引导:从触发器传递值';s按钮至模态';s按钮

Javascript 角度UI引导:从触发器传递值';s按钮至模态';s按钮,javascript,angularjs,twitter-bootstrap,Javascript,Angularjs,Twitter Bootstrap,需要一些指导。我将AngularUI引导与php和mysql一起使用。每次模态加载时,我想将链接列表中的值(由php mysql生成)传递给模态按钮 HTML 我一直在研究如何将值从触发器(a href)传递到模式按钮(a href)。您可以通过解析对象将数据发送到模式控制器: var modalInstance = $modal.open({ animation: $scope.animationsEnabled, templateUrl : 'SubmissionReminder.h

需要一些指导。我将AngularUI引导与php和mysql一起使用。每次模态加载时,我想将链接列表中的值(由php mysql生成)传递给模态按钮

HTML


我一直在研究如何将值从触发器(a href)传递到模式按钮(a href)。

您可以通过
解析
对象将数据发送到模式控制器:

var modalInstance = $modal.open({
  animation: $scope.animationsEnabled,
  templateUrl : 'SubmissionReminder.html',
  controller: 'SubmissionReminder',
  resolve: {
    refno: function () {
      return {refno: $scope.refno};
    }
  }
});
然后从模态控制器获得解析的参考号
refno

app.controller('SubmissionReminder', function ($scope, $modalInstance, refno) {
  $scope.refno = refno().refno;
  ...
}

userWOController是否看到了您要传递的值?
app.controller('submissionrementer',function($scope,$modalInstance,refno){$scope.refnos=refno;$scope.cancel=function(){$modalInstance.dismise('cancel');};})@vmaksym。。是这样吗?然后只需添加{{refno}}add Modal的buttton?我已经编辑了submissionalemployer控制器来演示如何调用它。是的,你可以像你给我看的那样把它添加到按钮上。
var modalInstance = $modal.open({
  animation: $scope.animationsEnabled,
  templateUrl : 'SubmissionReminder.html',
  controller: 'SubmissionReminder',
  resolve: {
    refno: function () {
      return {refno: $scope.refno};
    }
  }
});
app.controller('SubmissionReminder', function ($scope, $modalInstance, refno) {
  $scope.refno = refno().refno;
  ...
}