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
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
74
9. Routing and Navigation
iliaidakiev
0
91
6. Change Detection
iliaidakiev
0
39
7. Forms and simple validations
iliaidakiev
0
86
5. Predictable Reactive State Management
iliaidakiev
1
91
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
540
1. NG Introduction
iliaidakiev
0
180
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
The Curse of the Amulet
leimatthew05
3
16k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
59k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
Agile that works and the tools we love
rasmusluckow
331
22k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
So, you think you're a good person
axbom
PRO
2
2.2k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
600
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?