Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

drag-drop not found in @angular/cdk

i am trying to add the drag-drop feature in my Angular 6 application where i am trying to use angular material this is the overview link which i want to use. I followed the getting started instruction's but i am not able to use the "@angular/cdk/drag-drop" i tried installing the bellow package

npm install --save @angular/material @angular/cdk @angular/animations

and

npm install --save @angular/cdk

but the bellow folder is still missing enter image description here

import {DragDropModule} from '@angular/cdk/drag-drop';

the drag-drop is not available in my project even after following the steps. can anyone help me with that

like image 860
Jasmin Raval Avatar asked Mar 23 '19 10:03

Jasmin Raval


2 Answers

@angular/cdk/drag-drop exists only from version 7.0.0 of @angular/cdk. It seems you have to update angular and cdk to use drag-drop

like image 89
Andrei Avatar answered Nov 15 '22 04:11

Andrei


I had the same error. Try: ng add @angular/material

like image 45
Nata Sukhanova Avatar answered Nov 15 '22 04:11

Nata Sukhanova