StuffieStephie
创造了一个非常好的Pen,它拥有我需要的一切。
然而,即使我开始使用较新的库,我也无法让所有过滤的用户都能使用该电子邮件 - Outlook窗口会弹出,但To列表为空
<div id="email-list" class="modal">
<div class="modal-content">
<div class="row"> <b ng-repeat="d in names | filter:filters">{{d.email}}{{$last ? '' : ', '}}</b></div>
</div>
</div>
<a ng-href="mailto:{{d.email}}{{$last ? '' : ', '}}" class="waves-effect waves-light btn margin-bottom-1em"><i class="material-icons left">email</i>Email All {{selected.field}} Volunteers ({{(names | filter:filters).length}})</a>
<a href="#email-list" class="modal-trigger waves-effect waves-light btn margin-bottom-1em">View List of Email Addresses ({{(names | filter:filters).length}})</a>
答案 0 :(得分:0)
在代码中定义$scope.names
后,添加:(第363行)
$scope.emails = $scope.names.map(n => n.email).join(",");
转到第38行,将功能更改为:
$scope.hasChanged = function() {
$scope.filters = $scope.selected.field;
var emails = $scope.names;
if ($scope.filters) emails = emails.filter(n => n.status == $scope.filters);
$scope.emails = emails.map(n => n.email).join(",");
}
在电子邮件链接部分中,使用
ng-href="mailto:?bcc={{emails}}"