Questions tagged [angular-cdk]
Use this tag for questions concerning your own components using the Angular CDK (Component DevKit) or Angular Material components that depend on the Angular CDK's APIs, like the MatTable.
angular-cdk
711
questions
0
votes
0
answers
10
views
How to Implement Cloning, Auto-Arrangement, and Realignment of Drag-and-Drop Images in Angular CDK?
I am working on a drag-and-drop exercise in Angular. When I drag an image, it should be cloned. When I drop it into the designated container, it should be fixed to that container. If I place the image ...
1
vote
1
answer
41
views
Angular Drag & Drop with nested section and subsection
I am trying to implement a drag-and-drop feature in my Angular 14 Application where I have nested sections and subsections. I want to move each section up or down and subsections will be moved between ...
2
votes
1
answer
34
views
Issue with Angular CDK overlay inside another
I am using the Angular CDK overlay to show a modal drawer on my page. I am also using the Angular CDK Overlay for tooltips. It's possible that I may have a control in my drawer with a tooltip. The ...
0
votes
0
answers
14
views
How to upgrade CDK Virtual for loop for angular 17
Im upgrading code to angular 17 and needing to update if statements and for loops as i go. I have noticed that if statements and for loops are easy enough but im struggling to move the cdkVirtualFor ...
1
vote
1
answer
34
views
CdkMenu submenus not aligned
I am working on a menubar using the @angular/cdk menu component.
You can find here a repro from stackblitz.
Currently the menubar works fine but there is a detail that is bothering me. Is it normal ...
1
vote
1
answer
32
views
The position of source element rectangle position is confusion in angular cdkDragStarted
I am locating the offset position of mouse point when drag a div, suppose to be mouse.x-div.x is all I need, but the div.x is a large negative number(-15984). I am wondering why, and how to resolve ...
2
votes
1
answer
54
views
Nested navigation menu with CdkMenu
I struggle to make a full working navigation with nested menus using the @angular/cdk menu module.
Here is the StackBlitz.
Why are the nested menus not closing when I select another top-level menu?
...
1
vote
1
answer
14
views
How to set cdkDrag boundary dynamically in typescript
Here is the thing, I wonder if we can set cdkDrag boundary in typescript?
@Input() public container: any;
constructor(public el: ElementRef, private dragDropService: DragDrop) {
}
ngAfterViewInit(): ...
0
votes
0
answers
25
views
Getting CDK overlay to stick within a card
I am using CDK overlay to render an Action dropdown but when the dropdown comes it has a fixed position and kinda is off the card hence when I scroll it stays at the same place.
html for the overlay ...
0
votes
0
answers
44
views
Using Angular router outlet in overlay
I want to use router outlet in dynamically added overlay element. I have route which is opening overlay on init and component rendered on overlay has his own router outlet. I also use ViewContainerRef ...
0
votes
1
answer
37
views
Angular 17: Resizer using Cdk Drag
I am trying to rewrite a resizer using cdk drag. The way I have taken seems valid, but there is little control during resizing, the size seems to follow an exponential trend.
Surely I am missing ...
1
vote
1
answer
48
views
Pass data back from cdkPortalOutlet ComponentPortal to parent component
I have tried to use this method cdkPortalOutlet with ComponentPortal, and I used Injector.create to pass data from parent to portal component it works fine.
I want to pass data back from portal ...
2
votes
1
answer
137
views
Angular: cdk-virtual-scroll-viewport- scrollWindow attribute not working in angular ssr (universal), giving error- document is not defined
On using cdk-virtual-scroll-viewport in Angular SSR app and adding scrollWindow attribute, I am getting the following error:-
document is not defined
at _CdkVirtualScrollableWindow (...\...
0
votes
1
answer
73
views
Which Material Design version is my Angular project using?
Since the recent release of Material Design 3, the Angular Material is diligently trying to switch to it.
The problem is that I want to stay on Material Design 2, since most of the buttons have ...
0
votes
2
answers
159
views
Preprocessing Angular templates before compiling
I'm trying to plug into the compile step and modify the AST to amend a data attribute to DOM elements (HTML templates).
This is to inject information into the DOM at compile time without modifying the ...