
Create a new list draggable directive in Angular, apply it to a container div with class list, and tag items with a list drag attribute to enable drag-and-drop.
Define initial properties for an advanced Angular directive, including mousedown and milestone flags, optional drag item and track placeholder, initial coordinates, and dependency injections, with CSS classes for drag state.
Explore the init method in an Angular directive through a diagram, wire a mousedown listener on the host element, use a placeholder during drag, and apply drag and drop classes.
Implements an init method to enable drag and drop in a list, starting on mousedown, using elementFromPoint to identify the target, creating a drag placeholder, and applying absolute positioning.
Attach a document move listener to drag the item beyond its host, compute x and y offsets from the click and scroll, then update the drag item's top and left.
Implement drag-and-drop within a single list by determining the insertion point via elements from point, filtering by list-track, and preventing duplicate hover logs with a previous-target check.
Explore how to handle drag-and-drop in Angular directives by measuring item height with getBoundingClientRect, translating items with CSS, and determining drop direction using target and placeholder indices.
Develop methods to compute drag placeholder and item indices in an Angular directives course, using translateY extraction from transform matrices and element size to adjust indices.
Learn to determine drag direction in an Angular directive by comparing placeholder and target indices, casting to an HTML element, and logging up or down directions for reordering.
Analyze a drag-and-drop algorithm that rearranges list items using a blue placeholder. Observe how items above the placeholder shift down toward the new target to avoid overlap.
Create a core filter method for a drag operation in angular directives, manage up and down directions, and preserve the drag placeholder while rearranging items by target index.
Implement drag-and-drop item rearrangement in an advanced Angular directives course by updating the drag placeholder and item positions to keep list order correct during dragging.
Complete the drag and drop by adding a mouseup listener, calculating the drop position via the drag placeholder, and animating the drop before placing the item in its new location.
Connect two item lists with a connectedTo directive by exposing a template variable, passing list instances, and enabling drag and drop between lists.
Adjusts the directive init method to initialize only when connected to an instance and mirrors initial x and y for dragging between two lists, using a host receive class.
toggle between two lists by switching host receive and host track states, updating placeholders and drag classes, and initializing the connected host for seamless drag-and-drop between lists.
Adjust the mouse up method to reset the connected host instance after dropping items, perform cleanup with the renderer, and restore default states for connected lists and items.
Create a selectable directive for tables in an advanced Angular directives course, configure host access, initialize on ngOnInit, and delegate table behavior to a dedicated TableSelection class.
Implement a mouse down handler that identifies the clicked table cell using elementsFromPoint and closest TD, then render a selection div and compute its position with getBoundingClientRect.
Capture the start item on click and the end item on mouse move for selection. Store them as start and end properties to compute the selection area and selected cells.
Explore implementing the core selection 'apply' method in an Angular directive, updating start and end positions, calculating bounding rects, and expanding selection in all directions with renderer updates.
Define a final mouse up handler that resets mousedown to false and clears start and end, and attach a table mouse up listener with a global outside-click reset.
Add list selection to a directive, mirroring table selection, using list items with a selectable item attribute. Implement vertical, start-end index logic for lists and a dual table/div handling.
Welcome to this course on advanced Angular directives. This course is dedicated to creating real world directives from scratch, without the use of external or third party libraries. You will acquire a strong grasp of the fundamental concepts and gain practical skills, empowering you to not apply those skills to your projects but also create other complex directives independently on your own.
This Course Covers:
Drag and Drop:
Delve into various techniques, including item reordering, transferring data across different lists, event handling, DOM manipulation, and user interactions.
Getting familiar with various Document Object Model (DOM) methods
Use this knowledge as a foundation tool in order innovate and construct entirely new functionalities tailored to your needs or for your project.
Mouse Selection:
Focus on mouse selection on different elements (tables and lists), understanding the management of mouse events, capturing selections, and more.
The key highlight is our in depth exploration of drag and drop and mouse selection functionality, providing you with the expertise needed to build something great on your own. Whether you are an Angular developer or a frontend developer transitioning from other frontend stacks, aiming to elevate your skills and understand the process of building complex features from start to finish, this course is tailored for you. Enroll now to deepen your understanding of advanced Angular directives and acquire practical skills!