ycliper

Популярное

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

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

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

Топ запросов

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

Custom Pipe - Angular (Tutorial #16)

Автор: Nisha Singla

Загружено: 2018-05-29

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

Описание: In this video we will learn about Custom Pipe in Angular.

Pipes are one of the interesting feature of angular but sometimes built-in pipes are not sufficient for our formatting data , there we create Custom pipes

Use this link to share this video:    • Custom Pipe - Angular (Tutorial #16)  

To create custom pipe we need to create a .ts file and that file will be a pipe with the help of @Pipe decorator. Use ng generate command to create Custom pipe

ng g p pipes/age

here it will create one pipes folder inside app folder and inside pipes folder it will create age.pipes.ts

All Custom pipe must implements PipeTransform interface and we need to define transform() method. Transform method will define the logic for custom pipe. Transform() method takes atleast one parameter that is used to hold the data on which we are using pipe. and if your pipe is parameterised then we need store that value after the first arguements

transform(value: any): any {
let currentYear:any = new Date().getFullYear(); // 2018
let userBirthYear:any = new Date(value).getFullYear();
let userAge = currentYear-userBirthYear;

return userAge;
}
We are taking date of birth from template and from this date we are extracting only year to get the age of the user.


If you liked my channel , subscribe to it and like my videos. For any queries ask you question in comment section

you can also connect with me @

Facebook:   / angularjs4beginners  
LinkedIn:   / nisha-singla-82407aa0  
Website :

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
Custom Pipe - Angular (Tutorial #16)

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

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

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

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

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

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

Services - Angular (Tutorial #17)

Services - Angular (Tutorial #17)

Content Projection with ng-content (Tutorial 36)

Content Projection with ng-content (Tutorial 36)

Pipes - Angular (Tutorial #15)

Pipes - Angular (Tutorial #15)

Lazy Loading - Angular (Tutorial #29)

Lazy Loading - Angular (Tutorial #29)

Angular Pipes in Depth | Angular Concepts made easy | Procademy Classes

Angular Pipes in Depth | Angular Concepts made easy | Procademy Classes

RxJS Subject | Что такое RxJS Subject — Angular (Урок 31)

RxJS Subject | Что такое RxJS Subject — Angular (Урок 31)

Музыка для работы за компьютером | Фоновая музыка для концентрации и продуктивности

Музыка для работы за компьютером | Фоновая музыка для концентрации и продуктивности

HTTP Service - Angular (Tutorial #18)

HTTP Service - Angular (Tutorial #18)

Программируем с ИИ в VS Code - БЕСПЛАТНО! Сможет каждый!

Программируем с ИИ в VS Code - БЕСПЛАТНО! Сможет каждый!

CanDeactivate Route Guard - Angular (Tutorial #26)

CanDeactivate Route Guard - Angular (Tutorial #26)

Route Parameters - Angular (Tutorial #21)

Route Parameters - Angular (Tutorial #21)

Декораторы Python — наглядное объяснение

Декораторы Python — наглядное объяснение

Jazz & Soulful R&B  smooth Grooves  Relaxing instrumental Playlist /Focus/study

Jazz & Soulful R&B smooth Grooves Relaxing instrumental Playlist /Focus/study

Routing - Angular (Tutorial #20)

Routing - Angular (Tutorial #20)

Cursor AI: полный гайд по вайб-кодингу (настройки, фишки, rules, MCP)

Cursor AI: полный гайд по вайб-кодингу (настройки, фишки, rules, MCP)

SHAZAM Top 50🏖️Лучшая Музыка 2025🏖️Зарубежные песни Хиты🏖️Популярные Песни Слушать Бесплатно #40

SHAZAM Top 50🏖️Лучшая Музыка 2025🏖️Зарубежные песни Хиты🏖️Популярные Песни Слушать Бесплатно #40

Deep House Mix 2024 | Deep House, Vocal House, Nu Disco, Chillout Mix by Diamond #3

Deep House Mix 2024 | Deep House, Vocal House, Nu Disco, Chillout Mix by Diamond #3

Kubernetes — Простым Языком на Понятном Примере

Kubernetes — Простым Языком на Понятном Примере

Directives in Angular Applications

Directives in Angular Applications

#102 What are Pipes in Angular | Understanding Angular Pipes | A Complete Angular Course

#102 What are Pipes in Angular | Understanding Angular Pipes | A Complete Angular Course

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



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



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