I should really stop thinking that everything is so complicated before I start it. Thanks for your tutorial mate, I couldn't of done it without you!
@iRant4u
3 жыл бұрын
I think you may have just gotten me a job lol this was the last piece I was missing for an interview project! Thanks so much. Great video.
@kardashevr
5 жыл бұрын
why on earth would anybody dislike this gem?
@gomidefabio
5 жыл бұрын
As usual, a very great job! Thank you!
@stevewitman
5 жыл бұрын
If I am not mistaken, when this example is completed, dragging items within just the first list (“numbers”) still works but dragging items within the second list (“otherNumbers”) causes items in the first list to move instead of the within the second list. Seemingly, this behavior can be corrected by changing the first argument in moveItemInArray method from this.numbers to event.container.data like Stephen mentioned at 5:05 seems to correct this behavior. I am new to this drag-and-drop so please correct me if there is a better deal with this. I realize this was just meant to be a very quick demo and not comprehensive one … thanks for the example!
@abhinav22585
3 жыл бұрын
Great job explaining it man, much appreciated !
@israamoqbel3452
5 жыл бұрын
Great demo, thank you!
@gwapster13
5 жыл бұрын
Awesome demo
@Abdullahalmamun-bf5tc
4 жыл бұрын
this was amazing
@kamalvarshney6517
3 жыл бұрын
I want the scroll bar working with the drag drop functionality
@HSDevStudio
6 жыл бұрын
Hi Stephen, As usual an awesome articulation from your end. You ease learning process. I am developing a complex header with Authorization and dynamic menu items and trying to expose this as angular elements but the features fail in IE although I have necessary polyfills, if I somehow fix this then it fails in chrome. Was really expecting v7 to solve the elements packaging and polyfills issues. Could you provide some pointers. Any help is really appreciated.
@DigitalFluency
6 жыл бұрын
Thanks for the feedback! Regarding your IE Angular Elements issue, you should file an issue on github.com/angular/angular to let us know, with the specifics, then we can follow up and work on it.
@daniellaerachannel
6 жыл бұрын
what OS do you use ? thanks
@tonylancer7367
5 жыл бұрын
He is using Kubuntu.
@tonylancer7367
5 жыл бұрын
@@user-if1de8pt2j Kubuntu is a different flavor of the popular open-source Linux operating system, Ubuntu.
@tonylancer7367
5 жыл бұрын
@@user-if1de8pt2j If you *REALLY* need a Mac, get one, it serves to be a strong machine for many dev things. Otherwise, you can do the same thing on a Windows or Linux system.
@tonylancer7367
5 жыл бұрын
@@user-if1de8pt2j There is a Windows NVM here -> github.com/coreybutler/nvm-windows. As for Docker you can either use VirtualBox or use Vagrant (which is primarily the same thing), and Vagrant runs on windows. If you really do want Docker for Windows, it is available for Windows 10 Home. -> stackoverflow.com/questions/44406422/docker-installation-issues-on-windows-10-home-edition#answer-44406499 For node-sass you can try the StackOverflow answer here -> stackoverflow.com/questions/46953808/node-sass-installation-issue-on-windows-10#answer-46977724. Windows needs a lot of configuration to get things to work, that's one of the great pains of working with Windows. Linux provides a different, more stable (and probably closer to Mac) configs as possible. Mac is well, Mac. Many devs use it, and I believe are quite happy with it.
@mateiadriel353
5 жыл бұрын
@@user-if1de8pt2j for me node-sass is working on windows without any problems
@Aditya9756
3 жыл бұрын
Great video :)
@rangabharath4253
4 жыл бұрын
awesome
@unreadwitharun
4 жыл бұрын
Hey there, I just tried the steps & everything works fine. But am facing issue when the list is large & while dragging a card, it's not autoscrolling. Any idea how we can fix that. Even though on angular material website, all the demos have autoscrolling working.
@TheMrZachHill
5 жыл бұрын
Amazing learn!
@mahendrashoor7641
4 жыл бұрын
i want to create seat layout for movie ticket booking as each screen has different seating arrangement .how do i create such layouts and store them in backend so that any user visit site i can show them layout .can any one help me in this regard?
@mens1405
6 жыл бұрын
Very cool examples. Is there a possibility that you can show drag and drop in the mat-grid-list as shown in the blogpost of the release of angular 7?
@adiyamnerri1816
4 жыл бұрын
This is great man. 😁
@jjgrego1103
4 жыл бұрын
in the video he registers a drop event on the html, which is bound back to the component. i tried doing the same thing - dragging files into an area. however, i don't see my component method firing... any other wiring needed?
@makepetsfirst
5 жыл бұрын
Great, great video> I have a question though. How can I disable the sorting while dragging? Is it possible? Thanks in advanced
@christiankomodo
2 жыл бұрын
You can do that and all kinds of other customizations: material.angular.io/cdk/drag-drop/overview
@poormancodespmc4598
4 жыл бұрын
Thank you for the great tuto. I don't try it yet. Will it be persistent? I mean after reloqding the page will the droped items will remain in place do I need additional work like storing index in database to make it persistent?
@shivammakwan6409
6 жыл бұрын
PowerHouse Angular 😎
@Matty0187
6 жыл бұрын
Can you combine this drag and drop with virtual scroll?
@florexsatis
5 жыл бұрын
as soon as i saw the intro i pressed like. No way hes bad. And i was right :) gg mate
@weluvhockey
6 жыл бұрын
Great video. Can this functionality drag a selection of items at once?
@nerdiloo9863
5 жыл бұрын
Short answer is yes. Remember Angular is MVVC-ish.. if you can't tackle the problem from the view, you can do it from the controller. In your case whatever item is selected could be added to an array and the array is set a the 'draggable'.
@Xeberus18
5 жыл бұрын
do you have an idea how to implement scrolling while draggin an item ? like a tolerance on the bottom or top and when you reach it it will scroll up or down the list ?
@anil0407
5 жыл бұрын
Great video. Thanks for demoing such cool thing in angular. Can we program this to drag and drop multiple items.
@raghuZanne
5 жыл бұрын
@4:40 the data model doesn't update for me. [cdkDropListData]="numbers" is how to update the source data.
@arcticspacefox864
5 жыл бұрын
So what if I get my data from an external mongodb database? like I receive an ITodoItem[] and want to drag and drop and change the priority of them. How do I do that?
@JohnMonnett
5 жыл бұрын
how would you dynamically create cdkDropList containers from an array of container attributes?
@cross7140
6 жыл бұрын
Very cool, same examples of UX that a user might need such functionality?
@salwenikhil456496
5 жыл бұрын
Short and nice video. Can we drop element at specific position for example at the mouse pointer {x,y}position.
@nerdiloo9863
5 жыл бұрын
Short answer is yes - on the drop event you could check the location of the mouse. I'm not sure why you would want to do that because that x,y co-ord is just 1 tiny pixel. You'd have to calculate a region (like top left, top right, bottom right, bottom left) to see if it dropped in that area ... so it's better to place an element on the page and use it as a drop-zone.
@aram5642
5 жыл бұрын
Can CDK DragDrop be used to drag-to-select items in a table or list?
@Gaurav-bu5be
6 жыл бұрын
Thanks. Do we have functionality to drag and copy?
@kortneydahlston7832
5 жыл бұрын
is there a way to save/persist the drop location on a refresh? I want to drag some items around and have the page remember where I left them when I refresh the page
@webdave_de
5 жыл бұрын
the easiest way to solve this would be LocalStorage. The data will be saved on your machine.
@UniNetwork
6 жыл бұрын
How to create an interactive ERD diagram with this i wonder?
@masterlup
5 жыл бұрын
How can we do nested Lists? For e.g. having a list of n elements Inside of a list. That could itself be moved in one piece.
@nerdiloo9863
5 жыл бұрын
You'd set not the LI (list items) to be draggable, but the UL.. the parent HTML element.
@TheDsadsadass
5 жыл бұрын
How to set the position of items with localhost Data?
@chaitanyamedapati770
5 жыл бұрын
i got the error plse giive a solution ERROR Error: Uncaught (in promise): Error: Template parse errors: There is no directive with "exportAs" set to "cdkDropList" (" installed cdk and imported import {CdkDragDrop, moveItemInArray,CDK_DROP_LIST,transferArrayItem} from '@angular/cdk/drag-drop'; and uploade in app.module.ts as import { DragDropModule } from '@angular/cdk/drag-drop';
@vankhanhnguyen2514
4 жыл бұрын
I want to copy layout not move , Can U help me plz
@oleksiibereznikov4774
3 жыл бұрын
Typing like a crazy)
@rikihanks
4 жыл бұрын
can i have a list conected to multiple lists?
@deepamedipally3305
5 жыл бұрын
Does this work for mat-table?
@blvnktek
5 жыл бұрын
Dude ur a fucking g!!!!
@viewithnishikant
4 жыл бұрын
Slow down.. you are too fast...
@gouthamcold
5 жыл бұрын
This is so helpful. And I have a query. Is it possible to have a list of custom made ng components and make them drag and drop inside the container? I tried to do it but I failed in it. I'm not able to pass the previous and current index of the list item to the drop function. Note i'm not using ngFor for repeating a single div instead I used multiple divs which in turn holds my custom component. If you have any tips or suggestion on it let me know. Thanks
@nerdiloo9863
5 жыл бұрын
Each component would have to know what's going on so you'd have to pass information for the event handlers. You could pass info using the Input/Output or create Service and store your shared functions there, then inject the function into each component. If you're unsure try working with Input/Output event emitters.
@kittunandu
6 жыл бұрын
hi is thier a method to just copy the array instead of transfer could youe please help with this
@nerdiloo9863
5 жыл бұрын
If you're using the cdk you'll want to do it the cdk way .. it connect to 'lists' using the 'connected-to' and that does the job for you. If you're not using ng7 then sure can make something with vanilla javascript.
Пікірлер: 62