Angular Directive. Analog of Mat Table. Structural directive for passing a template

Опубликовано: 29 Апрель 2026
на канале: Максим Гром
2,278
153

This video covers an advanced use of structural directives to pass ng-template with parameters to a component.

A directive can be a transport element for associating parameters and a reference to a template and retrieving directives via ViewChildren. This video shows all this clearly

A more complex version of this pattern will be considered in the sequel

===============================
Code of the finished lesson:
https://github.com/MaksymGrom/angular...
================================
Instructions for installing the angular project:
Option 1:
Go through the playlist:    • Как работает WEB. Место и задачи Angular н...  
Option 2:
https://github.com/MaksymGrom/angular...
Download dependencies (npm install)
You can run the project (ng serve)
===============================

Choosing a code editor is up to you, but in this playlist I'm using webstorm. How to set up one of the most popular editors below:
VS Code:    • VS Code extensions для работы с angular пр...  
WebStorm:    • WebStorm работа с angular проектом и GIT. ...  

Angular architectural elements    • Angular архитектурные елементы. Что есть в...  
RxJS basics    • RxJs Теория: Observable, Observer, Subscri...  
More about OnPush    • ngOnChanges vs ngDoCheck. ChangeDetectionS...  
A little old video about immutability    • Immutable. Неизменяемость данных JavaScript  

Don't forget that SQL is important no matter what you plan to do in web development, even if you plan to be a project manager.
The SQL course can be found at the link:    • Что такое SQL? Как работать с WebSQL? Осно...  

Thank you for continuing to watch me and delight me with your comments.

---- Social networks
Telegram, where you can find out about new videos and receive additional content
https://t.me/webDevGromMaxChannel
P.S. I respond faster on YouTube than on Telegram, I will be glad to receive comments on YouTube

----
To support the channel
1) You can like (or dislike, if you didn't like the video)
2) Leave a comment longer than 5 words
3) Watch the video to the end (this way the retention will be higher and it will help me in promotion)
4) Leave a review in the comments, what can be improved in the video, so that you don't want to close it
5) You can become a member of my channel on a paid basis    / @grommaks  

#directives #angular #grommax

You can financially support the channel in the following way
1) Transfer to the card https://send.monobank.ua/7oqmsFg3Y
2) Take the survey to help choose the right options support
https://forms.gle/ZbFCKJSpDNYp4AMC6

Contents
00:00 - Introduction
00:31 - Project setup
00:45 - Creating a table component
04:23 - Preparing data for the table
05:20 - table header directive
06:56 - Overriding the ID column
07:27 - table component ContentChildren
10:35 - Using a structural directive
12:35 - Quick guide