angular-ui-bootstrap modal not passing back result

后端 未结 1 1415
南方客
南方客 2021-01-12 00:56

I am running into a problem with the modal service from Angular-ui-bootstrap. I have set up the modal according to the example on : http://angular-ui.github.io/bootstrap/ b

1条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-12 01:22

    What does the console.log() inside $scope.ok show? If it does indeed show the correct value, I would suggest wrapping your schedule data inside an object, to avoid any scope related issues:

    $scope.schedule = { data: '' };
    

    Then inside your modal view:

    
    

    And your output:

    $modalInstance.close($scope.schedule.data);
    

    0 讨论(0)
提交回复
热议问题