在一个cotroller中的scope如何在modal中的controller中使用,怎么传过去,研究了下$scope.$parent,还是没明白怎么弄
光阴似箭催人老,日月如移越少年。
如果你用的UI Bootstrap的modal, 有个scope参数,直接把controller的$scope传进去就行了:
scope (Type: $scope) - The parent scope instance to be used for themodal's content. Defaults to $rootScope.
如果你用的UI Bootstrap的modal, 有个scope参数,直接把controller的$scope传进去就行了: