cost 67 ms
我安裝了“@angular/cdk”並在導入 DragDropModule 時出錯,我做錯了什么?

[英]I install '@angular/cdk' and got an error when I import DragDropModule, what do I do wrong?

你想做什么? 我想使用@angular/cdk (源代碼)來制作一個可拖動的模式,如他們的教程中所見 再生產 npm i @angular/cdk 然后當我在我的文件 xxx.module.ts 中導入模塊時: import { DragDropModule } from '@angular/ ...

有沒有辦法使組件(而不是元素)在 angular 中可拖動?

[英]Is there a way to make components (not elements) draggable in angular?

我使用 Angular CDK 拖放模塊,它在 div、p 等 html 元素上運行良好。 但是由於某種原因,當我在組件上放置 cdkDrag 指令時,它不起作用。 我注意到的另一件事是,angular 中的每個組件的寬度和高度都設置為auto (基本上是 0x0),除非我編輯 css 並將di ...

錯誤TypeError:無法讀取Angular 7 Drag and Drop中未定義的屬性“length”

[英]ERROR TypeError: Cannot read property 'length' of undefined in Angular 7 Drag and Drop

我只是想在@angular/cdk/drag-drop的Angular 7 DragDropModule的幫助下創建拖放組件。 但我總是得到如下錯誤。 這是我的HomeComponent.html 和HomeComponent.ts 我知道我錯過了什么。 但不確定,它 ...


排序:
質量:
 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM