- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
Angular 15 : Object property change detection
In this tutorial, we will see how to overcome the shortcomings of
onchanges class by implementing docheck class.
In the previous tutorial, we had seen a example for implementation of onchanges.
We saw how to pass the simple model and a object of type class from the parent component to the child component. The child component has implemented the onchanges class.So on the ngonchanges method we can get all the changes happening to the model in the parent component.
But this is applicable only to simple model. In case of objects its not possible.
eg. if the property of a object changes then the child was unable to detect the changes.
eg : car: Car;
car.name (here car is the object and if the property of this object changes then we are unable to detect it.
To overcome this issue, we can use the docheck class.
Here we will have to implement the ngDoCheck method in which we can write the customized logic for change detection of the
properties of the object.
Видео Angular 15 : Object property change detection канала Techie Ocean
onchanges class by implementing docheck class.
In the previous tutorial, we had seen a example for implementation of onchanges.
We saw how to pass the simple model and a object of type class from the parent component to the child component. The child component has implemented the onchanges class.So on the ngonchanges method we can get all the changes happening to the model in the parent component.
But this is applicable only to simple model. In case of objects its not possible.
eg. if the property of a object changes then the child was unable to detect the changes.
eg : car: Car;
car.name (here car is the object and if the property of this object changes then we are unable to detect it.
To overcome this issue, we can use the docheck class.
Here we will have to implement the ngDoCheck method in which we can write the customized logic for change detection of the
properties of the object.
Видео Angular 15 : Object property change detection канала Techie Ocean
Комментарии отсутствуют
Информация о видео
27 мая 2022 г. 18:13:52
00:15:04
Другие видео канала

![Angular component interaction [Part 4]](https://i.ytimg.com/vi/aThw-HksPIQ/default.jpg)


















