Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Angular NYC Presentation - 3 November 2014
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Jaco Pretorius
November 03, 2014
Programming
310
3
Share
Angular NYC Presentation - 3 November 2014
Jaco Pretorius
November 03, 2014
More Decks by Jaco Pretorius
See All by Jaco Pretorius
Searching with Solr
jacopretorius
0
79
Other Decks in Programming
See All in Programming
実用!Hono RPC2026
yodaka
2
300
Firefoxにコントリビューションして得られた学び
ken7253
2
150
ハーネスエンジニアリングとは?
kinopeee
13
6.8k
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
1
650
JAWS-UG横浜 #100 祝・第100回スペシャルAWS は VPC レスの時代へ
maroon1st
0
210
Programming with a DJ Controller — not vibe coding
m_seki
3
780
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
180
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
140
2026-04-15 Spring IO - I Can See Clearly Now
jonatan_ivanov
1
180
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
190
Agent Skills を社内で育てる仕組み作り
jackchuka
1
1.4k
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
310
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Optimising Largest Contentful Paint
csswizardry
37
3.7k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
GraphQLとの向き合い方2022年版
quramy
50
15k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
Everyday Curiosity
cassininazir
0
200
What's in a price? How to price your products and services
michaelherold
247
13k
The SEO Collaboration Effect
kristinabergwall1
1
440
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.3k
Music & Morning Musume
bryan
47
7.2k
Transcript
ANGULAR DIRECTIVES WTF EDITION WWW.JACOPRETORIUS.NET @JACOPRETORIUS
PREFACE WHY ADVANCED DIRECTIVES?
WHAT TO COVER • TRANSCLUDE • COMMUNICATING BETWEEN DIRECTIVES •
COMPILE VS LINK
TRANSCLUDE • SET TRANSCLUDE: TRUE • USE NG-TRANSCLUDE IN YOUR
DIRECTIVE’S TEMPLATE
TRANSCLUDE FUNCTION • GIVES COMPLETE CONTROL OVER HOW THE BODY
OF YOUR DIRECTIVE IS INSERTED INTO THE DOM • CONTROL THE SCOPE THAT IS USED INSIDE THE BODY OF THE DIRECTIVE • OPTIONALLY USE TRANSCLUDE: ‘ELEMENT’ INSTEAD OF TRANSCLUDE: TRUE
TRANSCLUDE IN ANGULAR • NG-IF • NG-INCLUDE • NG-REPEAT •
NG-SWITCH
COMMUNICATING BETWEEN DIRECTIVES • USING THE REQUIRE PROPERTY OF YOUR
DIRECTIVE • CONTROLLER(S) OF THE REQUIRED DIRECTIVE(S) BECOME AVAILABLE AS THE 4TH PARAMETER IN THE LINK FUNCTION
COMPILE VS LINK • WHEN SHOULD YOU USE COMPILE? •
PERFORMANCE • ANGULAR PAGE LIFE CYCLE • ESPECIALLY USEFUL IN DIRECTIVES USING TRANSCLUDE
COMPILE VS LINK STRUCTURE compile: function compile(tElement, tAttrs) { //
interact with template element return function postLink( ... ) { ... } } // or // link: function postLink( ... ) { ... }
COMPILE RETURNS A LINK FUNCTION
COMPILE IN ANGULAR • HTML ANCHOR <A /> • FORM
<FORM /> • NG-BIND • NG-CLOAK • NG-CLICK, NG-MOUSEDOWN, NG-MOUSEUP, NG- KEYDOWN, ETC • NG-INCLUDE
Q & A • WE’RE HIRING – GETHIGHTOWER.COM/JOBS • QUESTIONS?