- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
How do test code using inject()
Angular's inject function has been available since version 14 and was - next to Standalone Components - the star feature.
In this video, I explain why you want to switch from constructor-based dependency injection to inject(), although it doesn't make testing easier.
A bit about the difference between inject and TestBed.inject and finally, the TestBed.runInInjectionContext, which you require for testing an area in Angular where only inject() will work: HTTP Interceptors and Router Guards.
0:00 Introduction
0:05 Why inject()?
6:19 TestBed.inject()
10:30 TestBed.runInInjectionContext()
15:17 Summary & Farewell
Видео How do test code using inject() канала Rainer Hahnekamp
In this video, I explain why you want to switch from constructor-based dependency injection to inject(), although it doesn't make testing easier.
A bit about the difference between inject and TestBed.inject and finally, the TestBed.runInInjectionContext, which you require for testing an area in Angular where only inject() will work: HTTP Interceptors and Router Guards.
0:00 Introduction
0:05 Why inject()?
6:19 TestBed.inject()
10:30 TestBed.runInInjectionContext()
15:17 Summary & Farewell
Видео How do test code using inject() канала Rainer Hahnekamp
Комментарии отсутствуют
Информация о видео
5 марта 2024 г. 21:40:21
00:15:41
Другие видео канала





















