ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

Angular component communication

passing data from nested component in angular

angular inter component communication

angular child to parent

angular custom events

angular 5 eventemitter example

angular 5 component communication

angular 4 component interaction

angular 4 component communication

angular 2 component interaction

angular 2 component communication

angular 5 inter component communication

Автор: kudvenkat

Загружено: 2018-04-02

Просмотров: 45645

Описание: Text version of the video
http://csharp-video-tutorials.blogspo...

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
http://csharp-video-tutorials.blogspo...

Angular CRUD Tutorial
   • Angular CRUD tutorial  

Angular CRUD Tutorial Text Articles & Slides
http://csharp-video-tutorials.blogspo...

All Dot Net and SQL Server Tutorials in English
https://www.youtube.com/user/kudvenka...

All Dot Net and SQL Server Tutorials in Arabic
   / kudvenkatarabic  

In this video we will discuss, how to pass data from child component to parent component.

Component Input Property
1. In Part 33 of Angular CRUD tutorial we discussed how to pass data from parent component to child component.

2. To pass data from parent component to child component we use input properties.

3. In the child component we create a property with @Input decorator.

4. The parent component then binds to the child component's input property.

Component Output Property
1. On the other hand, to pass data from child component to parent component we use output properties.

2. The child component raises an event to pass data to the parent component.

3. To create and raise an event, we use EventEmitter object.

4. So the output property is an event defined using EventEmitter object and decorated with @Output decorator.

5. To specify the type of data that we want to pass from the child component to parent component we use the EventEmitter generic argument.

In the example below, the notify event is used to pass string data from the child component to parent component. This event data is commonly called event payload.
@Output() notify: EventEmitter<string> = new EventEmitter<string>();

If you want to pass a number instead of a string as event data, then you specify the generic argument type as number instead of string.
@Output() notify: EventEmitter<number> = new EventEmitter<number>();

If you want to be able to pass any type of data, you can use 'any' as the generic argument type.
@Output() notify: EventEmitter<any> = new EventEmitter<any>();

You can only pass one value using EventEmitter. If you want to pass more than one value using EventEmitter use a custom type like Employee as the generic argument.
@Output() notify: EventEmitter<Employee> = new EventEmitter<Employee>();

You can get complete code in text format from our blog post at the following link
http://csharp-video-tutorials.blogspo...

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
Angular component communication

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

Call child component methods and properties using template reference variable

Call child component methods and properties using template reference variable

Angular 10 Tutorial #15 - Component Communication | Angular 10 Tutorial For Beginners

Angular 10 Tutorial #15 - Component Communication | Angular 10 Tutorial For Beginners

@ViewChild/@ViewChildren in Angular (Tutorial 35)

@ViewChild/@ViewChildren in Angular (Tutorial 35)

#28 Non-Related Component Communication | Angular Component & Directives | A Complete Angular Course

#28 Non-Related Component Communication | Angular Component & Directives | A Complete Angular Course

Angular pure pipe

Angular pure pipe

Angular ElementRef | Angular ViewChild & ViewChildren - Accessing Elements Correctly

Angular ElementRef | Angular ViewChild & ViewChildren - Accessing Elements Correctly

Data Binding - Angular (Tutorial #6)

Data Binding - Angular (Tutorial #6)

Максимальное унижение Зеленского

Максимальное унижение Зеленского

Джулиан Трежер: Как говорить так, чтобы другим хотелось слушать

Джулиан Трежер: Как говорить так, чтобы другим хотелось слушать

What is Component in Angular 18

What is Component in Angular 18

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]