0

尊敬的专家:我正在使用 toastr.success 和 toastr.warning,它们运行良好。但它不适用于 toastr.confirm。我添加了 jquery、angularjs 和 toastr 库。任何想法或帮助提前谢谢。

<tbody>
                                <tr ng-repeat="a in all | filter : table" ng-click="showInEdit(a)" ng-class="{selected1:a === selectedRow}" style="cursor:pointer;">

                                    <td>{{a.SpecName}}</td>
                                    <td>{{a.DegName}}</td>
                                    <td>{{a.DocName}}</td>
                                    <td>{{a.Service_Type}}</td>
                                    <td>{{a.Service_Group}}</td>
                                    <td>{{a.Sub_service}}</td>
                                    <td style="text-align: center; width: 50px">
                                        <a href="">
                                            <img ng-click="edit();$event.stopPropagation();$event.preventDefault();" src="assets/images/pencil.png" />
                                        </a>
                                        <a href="">
                                            <img ng-click="delete(a)" src="assets/images/cross.png" />
                                        </a>
                                    </td>
                                </tr>
                            </tbody>

在控制器中

$scope.delete = function (sys) {
    toastr.confirm('Are you sure?', {onOk: (Doctorssetup.delete(sys.Sys_Key))  , onCancel: ({}) });}

错误是 TypeError: toastr.confirm is not a function at ChildScope.$scope.delete (AnglController.js:288)

4

0 回答 0