angular.js - angularjs $scope.$parent问题
大家讲道理
大家讲道理 2017-05-15 17:01:38
0
1
622

在一个cotroller中的scope如何在modal中的controller中使用,怎么传过去,研究了下$scope.$parent,还是没明白怎么弄

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

全部回复(1)
phpcn_u1582

如果你用的UI Bootstrap的modal, 有个scope参数,直接把controller的$scope传进去就行了:

scope (Type: $scope) - The parent scope instance to be used for the
modal's content. Defaults to $rootScope.

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板