{"id":18615067,"url":"https://github.com/andrewjbateman/angular-dragdrop-module","last_synced_at":"2026-04-12T07:37:02.539Z","repository":{"id":40944654,"uuid":"161887578","full_name":"AndrewJBateman/angular-dragdrop-module","owner":"AndrewJBateman","description":":clipboard: Angular app to learn about Drag and Drop module, following Youtube tutorial by 'Demos with Angular'","archived":false,"fork":false,"pushed_at":"2023-02-03T04:54:00.000Z","size":1484,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-27T02:45:26.719Z","etag":null,"topics":["angular","angular-material","angular15","drag","drag-and-drop","drop","html5","scss","tutorial-code"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndrewJBateman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-15T08:56:34.000Z","updated_at":"2023-09-07T11:24:59.000Z","dependencies_parsed_at":"2023-02-15T12:00:53.956Z","dependency_job_id":null,"html_url":"https://github.com/AndrewJBateman/angular-dragdrop-module","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fangular-dragdrop-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fangular-dragdrop-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fangular-dragdrop-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fangular-dragdrop-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrewJBateman","download_url":"https://codeload.github.com/AndrewJBateman/angular-dragdrop-module/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239406495,"owners_count":19633025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular-material","angular15","drag","drag-and-drop","drop","html5","scss","tutorial-code"],"created_at":"2024-11-07T03:28:00.987Z","updated_at":"2026-04-12T07:36:57.491Z","avatar_url":"https://github.com/AndrewJBateman.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :zap: Angular Dragdrop Module\n\n* Angular project using the [@angular/cdk/drag-drop module](https://material.angular.io/cdk/drag-drop/overview) to drag numbered boxes from a list on the left to a numbered list on the right and vice versa.\n* Tutorial code from [Demos With Angular](https://www.youtube.com/channel/UCYFd7Qy93YP7gPERnxP545A) but with updates due to updated Angular/Material versions - see [:clap: Inspiration](#clap-inspiration) below\n* **Note:** to open web links in a new window use: _ctrl+click on link_\n\n![GitHub repo size](https://img.shields.io/github/repo-size/AndrewJBateman/angular-dragdrop-module?style=plastic)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/AndrewJBateman/angular-dragdrop-module?style=plastic)\n![GitHub Repo stars](https://img.shields.io/github/stars/AndrewJBateman/angular-dragdrop-module?style=plastic)\n![GitHub last commit](https://img.shields.io/github/last-commit/AndrewJBateman/angular-dragdrop-module?style=plastic)\n\n## :page_facing_up: Table of contents\n\n* [:zap: Angular Dragdrop Module](#zap-angular-dragdrop-module)\n  * [:page_facing_up: Table of contents](#page_facing_up-table-of-contents)\n  * [:books: General info](#books-general-info)\n  * [:camera: Screenshots](#camera-screenshots)\n  * [:signal_strength: Technologies](#signal_strength-technologies)\n  * [:floppy_disk: Setup](#floppy_disk-setup)\n  * [:computer: Code Examples](#computer-code-examples)\n  * [:cool: Features](#cool-features)\n  * [:clipboard: Status \u0026 To-Do List](#clipboard-status--to-do-list)\n  * [:clap: Inspiration](#clap-inspiration)\n  * [:file_folder: License](#file_folder-license)\n  * [:envelope: Contact](#envelope-contact)\n\n## :books: General info\n\n* \"The [@angular/cdk/drag-drop module](https://material.angular.io/cdk/drag-drop/overview) provides you with a way to easily and declaratively create drag-and-drop interfaces, with support for free dragging, sorting within a list, transferring items between lists, animations, touch devices, custom drag handles, previews, and placeholders, in addition to horizontal lists and locking along an axis.\"\n\n## :camera: Screenshots\n\n![Example screenshot](./img/dragAndDrop.png)\n\n## :signal_strength: Technologies\n\n* [Angular v15](https://angular.io/)\n* [Angular Material v15](https://material.angular.io/)\n* [Angular Material Drag and Drop Module](https://material.angular.io/cdk/drag-drop/overview)\n\n## :floppy_disk: Setup\n\n* Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.\n* Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.\n\n## :computer: Code Examples\n\n* Function to move numbered blocks from 1 list to another.\n\n```typescript\n  drop(event: CdkDragDrop\u003cnumber[]\u003e) {\n    console.log(event.previousContainer.data); // initially returns array (10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n    console.log(event.container.data); // initially returns []\n\n      if (event.previousContainer !== event.container) { // check to see if moved across lists\n      transferArrayItem(\n        event.previousContainer.data,\n        event.container.data,\n        event.previousIndex,\n        event.currentIndex\n      );\n    } else { // move within the same array and change index\n      moveItemInArray(\n        this.numbers,\n        event.previousIndex,\n        event.currentIndex\n      );\n    }\n  }\n\n```\n\n## :cool: Features\n\n* Drag and drop functionality - from one list to the other (with certain restrictions - e.g. you cannot move an active item back to the new items list).\n* Items can be rearranged in their lists.\n* Transitions used between lists\n\n## :clipboard: Status \u0026 To-Do List\n\n* Status: Working\n* To-Do: nothing\n\n## :clap: Inspiration\n\n* [Youtube tutorial: Drag and Drop with the Angular CDK - What's New in v7](https://www.youtube.com/watch?v=t1CrWLGxQPk).\n\n## :file_folder: License\n\n* This project is licensed under the terms of the MIT license.\n\n## :envelope: Contact\n\n* Repo created by [ABateman](https://github.com/AndrewJBateman), email: gomezbateman@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fangular-dragdrop-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewjbateman%2Fangular-dragdrop-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fangular-dragdrop-module/lists"}