Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
8. Custom validations, controls and multi-provi...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
iliya
March 01, 2017
59
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
8. Custom validations, controls and multi-providers
Examples:
https://embed.plnkr.co/VJm56Q4hpIIAgkvmzGin/
iliya
March 01, 2017
More Decks by iliya
See All by iliya
10. Routing and Navigation 2
iliaidakiev
0
73
9. Routing and Navigation
iliaidakiev
0
90
6. Change Detection
iliaidakiev
0
39
7. Forms and simple validations
iliaidakiev
0
86
5. Predictable Reactive State Management
iliaidakiev
1
89
3. Angular CLI. Custom Directives. Renderer
iliaidakiev
0
84
4. Dependency Injection. Providers and Injectors
iliaidakiev
0
110
2. Functional Programming and RxJS
iliaidakiev
3
530
1. NG Introduction
iliaidakiev
0
180
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
Faster Mobile Websites
deanohume
310
32k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
450
Designing for Performance
lara
611
70k
How to Think Like a Performance Engineer
csswizardry
28
2.8k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
エンジニアに許された特別な時間の終わり
watany
109
250k
Site-Speed That Sticks
csswizardry
13
1.5k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
350
We Have a Design System, Now What?
morganepeng
55
8.3k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
920
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
290
Transcript
None
Schedule • Custom reactive validations • Multi-providers • Custom template
validations • Custom from controls
Model-driven validations https://github.com/angular/angular/blob/master/modules/ %40angular/forms/src/validators.ts
Custom model-driven validations https://embed.plnkr.co/VJm56Q4hpIIAgkvmzGin/ PostcodeValidation @
Custom async model-driven validations https://embed.plnkr.co/VJm56Q4hpIIAgkvmzGin/ AsyncPostcodeValidation @
ForwardRef • We use it because es6 classes aren't hoisted
• forwardRef takes a function as an argument that returns a class. The argument function is called after the class is declared.
DI Injectors Module Component Component Directive Directive • Every Component
has an Injector • Every Directive takes her parent Component's Injector
Multi Providers
Multi Providers Example (1) Creating a token
Multi Providers Example (2) Creating a directive 1
Multi Providers Example (3) Creating a directive 2
Multi Providers Example (4) Creating a collector
Multi Providers Example (5) Using all directives
Multi Providers Example (6) Example Result
Custom template-driven validations https://embed.plnkr.co/VJm56Q4hpIIAgkvmzGin/ emailValidatorProvider @
Custom async template-driven validations https://embed.plnkr.co/VJm56Q4hpIIAgkvmzGin/ asyncEmailValidatorProvider @
Custom Form Controls https://angular.io/docs/ts/latest/api/forms/index/ControlValueAccessor- interface.html
Custom Form Controls
Custom async template-driven validations https://embed.plnkr.co/VJm56Q4hpIIAgkvmzGin/ CounterComponent @
Questions?