将对象转移到模式 window angularjs
Transfer objects to modal window angularjs
我需要在模式中传输对象windows,我试过这种方式
$scope.OpenMessage = function (res) {
var modalInstance = $uiModal.open({
size: 'sm',
windowClass: 'modal-xs',
templateUrl: 'views/message.html',
controller: 'SearchCtrl',
resolve: {
items: function () {
return res;
}
}
});
};
但是当我尝试在 html {{res}} 中输出时,它显示为空
您可以使用 items.res
获取模态数据,记得在模态控制器中注入 items
依赖项。
希望对您有所帮助
我需要在模式中传输对象windows,我试过这种方式
$scope.OpenMessage = function (res) {
var modalInstance = $uiModal.open({
size: 'sm',
windowClass: 'modal-xs',
templateUrl: 'views/message.html',
controller: 'SearchCtrl',
resolve: {
items: function () {
return res;
}
}
});
};
但是当我尝试在 html {{res}} 中输出时,它显示为空
您可以使用 items.res
获取模态数据,记得在模态控制器中注入 items
依赖项。
希望对您有所帮助