AngularJs父子级Controller传递数据
// 子级传递数据给父级
// 子级传递
$scope.checkLoggedIn = function(type) {
$scope.transferType = type;
$scope.$emit('transfer.type', type);
}
// 父级接收
$scope.$on('transfer.type', function(event, data) {
$scope.transferTyp.
转载
2021-01-27 11:42:39 ·
289 阅读 ·
0 评论