Тёмный
No video :(

Angular content projection 

kudvenkat
Подписаться 832 тыс.
Просмотров 37 тыс.
50% 1

In this video we will discuss content projection in Angular with an example.
Text version of the video
csharp-video-tu...
Healthy diet is very important for both body and mind. We want to inspire you to cook and eat healthy. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking.
/ @aarvikitchen5572
Slides
csharp-video-tu...
Angular CRUD Tutorial
• Angular CRUD tutorial
Angular CRUD Tutorial Text Articles & Slides
csharp-video-tu...
All Dot Net and SQL Server Tutorials in English
www.youtube.co...
All Dot Net and SQL Server Tutorials in Arabic
/ kudvenkatarabic
Content projection helps us create reusable components. In Angular 1, this is called transclusion. Let us understand content projection, with an example. We want to create a reusable accordion type of control. The panel heading must be clickable, and when clicked the panel body and footer must be collapsed. Clicking on the panel heading again, must expand the collapsed panel body and footer.
Another important requirement is, this accordion panel must be reusable with any other component in our application. The component that uses this accordion panel component, must be able to specify what content it wants in the accordion panel body and footer.
For example, if we use this accordion panel, with a ProductComponent that displays a product, then in the accordion panel body, the ProductComponent may want to project and display product image, price, weight etc. In the footer, the ProductComponent may want to project and display buttons to customise the product or buy.
In our case we want to use this accordion panel, with DisplayEmployeeComponent. So in the panel body we want to project and display, employee photo, gender, date of birth, email etc. In the footer, we want to project and display buttons to View, Edit and Delete employee.
So the important question that we need to answer is, how will the components that use this accordion component be able to inject variable content into the acoordion panel body and footer.
By using ng-content tag.
You can think of this ng-content as a place holder for the variable content. In a bit we will understand, how a component that uses this accordion component can project variable content depending on the requirements of your application.

Опубликовано:

 

26 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 19   
@billbortkevich2300
@billbortkevich2300 4 года назад
Great video - you explain in 15 min concept that might take couple of hours using docs. And great real-world demo too. Many thanks
@RonakBhatt07
@RonakBhatt07 Год назад
This video explained beautifully about the concept of content projection. I was being asked in an interview about it but I was not sure about the concept of it. This video clears everything for me about this topic.
@nikhiltomar4543
@nikhiltomar4543 2 года назад
Thanks, man !! It's really a good stuff:)
@RajeshKumar-lw7gj
@RajeshKumar-lw7gj 3 года назад
Well explained !! Thanks
@msdhoni6419
@msdhoni6419 Год назад
Venkat bro we need ur videos please upload
@sourishdutta9600
@sourishdutta9600 6 лет назад
Hello Sir , Will you please a video series on node and express ?
@elderofzion
@elderofzion 6 лет назад
surf through freetutorials.us, bunch of node/express tutorials there to download
@chetnajain1495
@chetnajain1495 3 года назад
Sir can you please tell how we can use the tag in any other component and how to adjust the html template in the accordion.component.html so that only data that we want can be rendered , because I tried this technique in one of my project and it worked but now I have to use this accordion again in the same component and I am using another tag in the same component and keeping its Html template in the accordion.component.html in a separate but it is not working Please help sir. Thank You
@taherhendawi8874
@taherhendawi8874 6 лет назад
Hello Venkat, could you please make an example for save as button with angular? By the way you are the best :)
@antoniosteven4472
@antoniosteven4472 3 года назад
I realize Im kinda randomly asking but does anyone know of a good place to stream newly released movies online?
@calebluis2910
@calebluis2910 3 года назад
@Antonio Steven Flixportal
@antoniosteven4472
@antoniosteven4472 3 года назад
@Caleb Luis Thanks, I went there and it seems to work =) I really appreciate it!!
@calebluis2910
@calebluis2910 3 года назад
@Antonio Steven You are welcome xD
@priyahariharan7420
@priyahariharan7420 4 года назад
Hi,Thank you for the amazing videos! But I can't seem to get my bootstrap css working on panels like they were earlier. I browsed online and tried the new addition :host ::ng-deep in the css of display-component.css that got applied for other elements, but the basic classes: card-header,card-body and card-footer layouts are not generated once I change the accordion I am using Angular 10. Could you please help me with this problem?
@akashmakde2683
@akashmakde2683 3 года назад
he is using bootstrap 3, install bootstrap 3
@ayushagrawal6473
@ayushagrawal6473 5 лет назад
I had gone through the code u used and it seems easy. But the ng content is not working in any of the ways in my component. Help me to fix this out.
@shahrukhjethra2087
@shahrukhjethra2087 6 лет назад
keep up Sir , if possible to make video for angular6 . Thanks.
@bharadwaz2
@bharadwaz2 6 лет назад
Hi Sir, please make a video on Angular Internationalization, on multiple languages. Thank you sir.
@sviatoslavvovnianko3357
@sviatoslavvovnianko3357 5 лет назад
localization?
Далее
Online fake REST API
6:49
Просмотров 38 тыс.
Content Projection with ng-content (Tutorial 36)
15:57
Cute kitty gadgets 💛
00:24
Просмотров 12 млн
Angular accordion example
9:57
Просмотров 43 тыс.
Angular httpclient put example
12:46
Просмотров 32 тыс.
Angular query params
10:18
Просмотров 50 тыс.
Angular canactivate guard example
11:34
Просмотров 49 тыс.
ng-content in Angular | Directives | Angular 12+
12:54
Angular route loading indicator
12:05
Просмотров 52 тыс.
ngTemplateOutlet is WAY more useful than I realised
16:36
Angular component input property change detection
12:18