angular-dragdrop

How to limit drag - drop container to accept only one item in Angular Material Drag-Drop Feature

大城市里の小女人 提交于 2020-05-13 08:54:55
问题 When using @angular/cdk/drag-drop module (Angular Material Drag and Drop)... Is there any way to limit drop container so to accept only one value instead of multiple values? I am trying to create form where user can drag image and drop into field which should have only one item. I am using standard example code for implementation from Drag and Drop | Angular Material but cannot find solution where number of dropped items can be limited, and second cannot find solution to keep Drag list the

How to select the dropped data UI based on the value present in the dropped item

白昼怎懂夜的黑 提交于 2019-12-25 00:33:54
问题 Hi I am using angular 7 drag and drop feature. I am following this link https://stackblitz.com/edit/angular-material-drag-copy?file=app%2Fapp.component.html I want to check the data which is being dropped and based on the value i need to set whether it is a mat expansion panel or mat list. which is to be shown in the ui. I am using ngrepeat for generating the list items in both the drag and dropped place. Basically I want to decide the UI element which is to used based on the value that is

How to make template without ng-repeat and pass data to $scope with angular-drag-and-drop-lists?

为君一笑 提交于 2019-12-07 08:41:03
问题 I want to use angular-drag-and-drop-lists with my own grid template to WYSIWYG editor. How to build my own HTML template without ng-repeat so it will be able to drop items in any predefined column and store information in $scope in which column item has been dropped? I want to store dropped items in columns array: .controller('DragDropGrid', ['$scope', function($scope) { $scope.layouts = { selected: null, templates: [ {name: "Plugin", type: "item", id: 2}, ], columns: [], oldaproachcolumns: [

How to make template without ng-repeat and pass data to $scope with angular-drag-and-drop-lists?

▼魔方 西西 提交于 2019-12-05 14:29:33
I want to use angular-drag-and-drop-lists with my own grid template to WYSIWYG editor. How to build my own HTML template without ng-repeat so it will be able to drop items in any predefined column and store information in $scope in which column item has been dropped? I want to store dropped items in columns array: .controller('DragDropGrid', ['$scope', function($scope) { $scope.layouts = { selected: null, templates: [ {name: "Plugin", type: "item", id: 2}, ], columns: [], oldaproachcolumns: [ "A": [ ], "B": [ ] } ] }; } ]); This is currently not a working template. On drop it throws the error