0

我正在使用 ng-flow 拖放文件并上传到服务器。我正在开发的页面有多个 drop listeners 。有没有办法检测下降发生在哪个元素上?

    <body ng-app="droptest" flow-init="{target:''}"> 
    <div name="drop1" class="fa fa-paperclip fa-rotate-90 Cell small" flow-drop="" title="Drag/Drop files to upload to this record"></div>
 <div name="drop2" class="fa fa-paperclip fa-rotate-90 Cell small" flow-drop="" title="Drag/Drop files to upload to this record"></div>
     </body>

 $scope.$on('flow::fileAdded', function (event, $flow, flowFile) {
   //how to detect whether drop occured on drop1 or drop2?
});
4

1 回答 1

0

我想到了

 $scope.$on('flow::fileAdded', function (event, $flow, flowFile, elementDetails) {
               elementDetails.target 
         });
于 2015-06-18T01:22:13.220 回答