SlideShare a Scribd company logo
1 of 15
Download to read offline
How to Call A From B in Ember
Some ideas to try before you go crazy

Ben Donaldson, Crowdly
Ember has many layers
Like an onion
Or a sandwich
Or a skyscraper
Or your LiveJournal
Ember has many changes
How do I talk between layers?
Do those ways still work?

Is it the “Ember Way”?
How do I talk between layers?
I’ll list a bunch of ways that I found

Do those ways still work?
Yes, at least for the last few weeks

Is it the “Ember Way”?
Until it stops working
The List
The List
free to use!*

*You agree, to the fullest extent permitted by law, to indemnify and hold harmless Ben Donaldson against all damages, liabilities or costs, including reasonable attorneys' fees
and defense costs, to the extent caused by your negligent performance of professional services under this Agreement and that of anyone for whom you are legally liable.
You agree, to the fullest extent permitted by law, to indemnify and hold harmless Ben Donaldson against all damages, liabilities or costs, including reasonable attorneys' fees
and defense costs, to the extent caused by your negligent acts in connection with the Project and the acts of anyone for whom you are legally liable.
Neither you or I shall be obligated to indemnify the other party in any manner whatsoever for the other party's negligence.
Modifications to this Agreement.
Ben Donaldson reserves the right to change or modify any of the terms and conditions contained in this Agreement at any time. You acknowledge and agree that it is your
responsibility to review the Presentation and these Terms of Service from time to time. Your continued use of the Presentation after such modifications to this Agreement will
constitute acknowledgment of the modified Terms of Service and agreement to abide and be bound by the modified Terms of Service.
Unlike kangaroos and eucalyptus-eating possums, koalas are hindgut fermenters, and their digestive retention can last for up to 100 hours in the wild, or up to 200 hours in
captivity. This is made possible by the extraordinary length of their caecum—200 cm (80 in) long and 10 cm (4 in) in diameter—the largest proportionally of any animal. Koalas
can select which food particles to retain for longer fermentation and which to pass through. Large particles typically pass through more quickly, as they would take more time
to digest. While the hindgut is proportionally larger in the koala than in other herbivores, only 10% of the animal's energy is obtained from fermentation. Since the koala gains
a low amount of energy from its diet, its metabolic rate is half that of a typical mammal, although this can vary between seasons and sexes. The koala conserves water by
passing relatively dry faecal pellets high in undigested fibre, and by storing water in the caecum.
The List
We’ll have two models, called Apple and Orange
Each has their own route, controller, view, and template
This is just for the simplest case
When I’m AppleRoute…
Apple (the model)
this.modelFor(‘apple’)
OrangeRoute
this.get(‘router’).getHandler(‘orange’)
AppleController
this.controllerFor(‘apple’)
AppleView - no idea
Apple Template - no idea
When I’m AppleController…
Apple (the model)
this.get(‘content’) (if it’s an Ember.ObjectController)
AppleRoute
this.get(‘target’) (if you’re currently on that route)
OrangeController
needs: [‘orange’] (in the root of AppleController)
this.get(‘controllers.orange’)
AppleView - no idea
Apple Template - no idea
When I’m AppleView…
Apple (the model)
this.get(‘context’) (if AppleController is an Ember.ObjectController)
this.get(‘controller.content’) (if AppleController is an Ember.ObjectController)
AppleRoute
this.get(‘controller.target’) (if you’re currently on that route)
AppleController
this.get(‘controller’)
OrangeView - no idea
Apple Template
this.get(‘template’) (for the handlebars function, but you wouldn’t touch that much)
this.get(‘element’) (for the DOM element)
When I’m the Apple Template…
Apple (the model)
this.get(‘view.context’) (if AppleController is an Ember.ObjectController)
this.get(‘controller.content’) (if AppleController is an Ember.ObjectController)
AppleRoute
this.get(‘controller.target’) (if you’re currently on that route)
AppleController
this.get(‘controller’)
AppleView
this.get(‘view’)
Orange Template - no idea
In case of emergency...
Warning: these are not “elegant” or “the Ember Way” but could “let you meet a deadline”
Make an init function and make manual connections
AppleView = Em.View.extend({
init: function() {
this.get(‘controller’).set(‘yourAppleView’, this);
}
}
Ask the almighty ‘container’, available pretty much everywhere in your app.
this.get(‘container’).lookup(‘view:apple’)
THANK YOU
THESE SLIDES WILL BE ONLINE SOMEWHERE
THANK YOU
THESE SLIDES WILL BE ONLINE SOMEWHERE

obligatory tech talk meme photo -->

More Related Content

Viewers also liked

Why Enterprises Need Custom Billing Solutions?
Why Enterprises Need Custom Billing Solutions?Why Enterprises Need Custom Billing Solutions?
Why Enterprises Need Custom Billing Solutions?Invoicera Tondon
 
Web 2.0 and the world of global collaboration v2010
Web 2.0 and the world of global collaboration v2010Web 2.0 and the world of global collaboration v2010
Web 2.0 and the world of global collaboration v2010GroveSite
 
Inbound webinar presentation
Inbound webinar presentation Inbound webinar presentation
Inbound webinar presentation Cordium
 
Introducing ProspectStream
Introducing ProspectStreamIntroducing ProspectStream
Introducing ProspectStreamProspectStream
 
Real Estate Investment Guide - Waveland, Mississippi
Real Estate Investment Guide - Waveland, MississippiReal Estate Investment Guide - Waveland, Mississippi
Real Estate Investment Guide - Waveland, MississippiMarco Santarelli
 
Evolution in memory games
Evolution in memory gamesEvolution in memory games
Evolution in memory gamesDEVART
 
CRCC Corporate Overview
CRCC Corporate OverviewCRCC Corporate Overview
CRCC Corporate OverviewBrett Payne
 
8 LOS Features Credit Unions Need to Stay Competitive
8 LOS Features Credit Unions Need to Stay Competitive  8 LOS Features Credit Unions Need to Stay Competitive
8 LOS Features Credit Unions Need to Stay Competitive Doxim Inc.
 
What Lies Ahead
What Lies AheadWhat Lies Ahead
What Lies AheadMoboom
 

Viewers also liked (11)

Why Enterprises Need Custom Billing Solutions?
Why Enterprises Need Custom Billing Solutions?Why Enterprises Need Custom Billing Solutions?
Why Enterprises Need Custom Billing Solutions?
 
Web 2.0 and the world of global collaboration v2010
Web 2.0 and the world of global collaboration v2010Web 2.0 and the world of global collaboration v2010
Web 2.0 and the world of global collaboration v2010
 
Inbound webinar presentation
Inbound webinar presentation Inbound webinar presentation
Inbound webinar presentation
 
Introducing ProspectStream
Introducing ProspectStreamIntroducing ProspectStream
Introducing ProspectStream
 
Real Estate Investment Guide - Waveland, Mississippi
Real Estate Investment Guide - Waveland, MississippiReal Estate Investment Guide - Waveland, Mississippi
Real Estate Investment Guide - Waveland, Mississippi
 
Evolution in memory games
Evolution in memory gamesEvolution in memory games
Evolution in memory games
 
The Benefits of FileMaker Pro
The Benefits of FileMaker ProThe Benefits of FileMaker Pro
The Benefits of FileMaker Pro
 
CRCC Corporate Overview
CRCC Corporate OverviewCRCC Corporate Overview
CRCC Corporate Overview
 
Step Up Business Intelligence
Step Up Business Intelligence Step Up Business Intelligence
Step Up Business Intelligence
 
8 LOS Features Credit Unions Need to Stay Competitive
8 LOS Features Credit Unions Need to Stay Competitive  8 LOS Features Credit Unions Need to Stay Competitive
8 LOS Features Credit Unions Need to Stay Competitive
 
What Lies Ahead
What Lies AheadWhat Lies Ahead
What Lies Ahead
 

Similar to How to Call A from B in Ember

How To Write A Synthesis Essay Examples, Topics,
How To Write A Synthesis Essay Examples, Topics,How To Write A Synthesis Essay Examples, Topics,
How To Write A Synthesis Essay Examples, Topics,Tonia Wallace
 
Columbia University Essay Prompts. Online assignment writing service.
Columbia University Essay Prompts. Online assignment writing service.Columbia University Essay Prompts. Online assignment writing service.
Columbia University Essay Prompts. Online assignment writing service.Jamie Ruschel
 
Personal Essay For Med School Application
Personal Essay For Med School ApplicationPersonal Essay For Med School Application
Personal Essay For Med School ApplicationAndrea Santiago
 
Essay On My Favourite Teacher In Hindi 1500 Words
Essay On My Favourite Teacher In Hindi 1500 WordsEssay On My Favourite Teacher In Hindi 1500 Words
Essay On My Favourite Teacher In Hindi 1500 WordsJennifer Martinez
 
Essay In Upsc Mains 2014. Online assignment writing service.
Essay In Upsc Mains 2014. Online assignment writing service.Essay In Upsc Mains 2014. Online assignment writing service.
Essay In Upsc Mains 2014. Online assignment writing service.Diana Hole
 
Roscoe Hogan Environmental Law Essay Contest
Roscoe Hogan Environmental Law Essay ContestRoscoe Hogan Environmental Law Essay Contest
Roscoe Hogan Environmental Law Essay ContestJill Johnson
 
Essay Writing Service College Admissions Your -
Essay Writing Service College Admissions Your -Essay Writing Service College Admissions Your -
Essay Writing Service College Admissions Your -Stacy Vasquez
 

Similar to How to Call A from B in Ember (8)

Essay Help Websites
Essay Help WebsitesEssay Help Websites
Essay Help Websites
 
How To Write A Synthesis Essay Examples, Topics,
How To Write A Synthesis Essay Examples, Topics,How To Write A Synthesis Essay Examples, Topics,
How To Write A Synthesis Essay Examples, Topics,
 
Columbia University Essay Prompts. Online assignment writing service.
Columbia University Essay Prompts. Online assignment writing service.Columbia University Essay Prompts. Online assignment writing service.
Columbia University Essay Prompts. Online assignment writing service.
 
Personal Essay For Med School Application
Personal Essay For Med School ApplicationPersonal Essay For Med School Application
Personal Essay For Med School Application
 
Essay On My Favourite Teacher In Hindi 1500 Words
Essay On My Favourite Teacher In Hindi 1500 WordsEssay On My Favourite Teacher In Hindi 1500 Words
Essay On My Favourite Teacher In Hindi 1500 Words
 
Essay In Upsc Mains 2014. Online assignment writing service.
Essay In Upsc Mains 2014. Online assignment writing service.Essay In Upsc Mains 2014. Online assignment writing service.
Essay In Upsc Mains 2014. Online assignment writing service.
 
Roscoe Hogan Environmental Law Essay Contest
Roscoe Hogan Environmental Law Essay ContestRoscoe Hogan Environmental Law Essay Contest
Roscoe Hogan Environmental Law Essay Contest
 
Essay Writing Service College Admissions Your -
Essay Writing Service College Admissions Your -Essay Writing Service College Admissions Your -
Essay Writing Service College Admissions Your -
 

Recently uploaded

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Recently uploaded (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

How to Call A from B in Ember

  • 1. How to Call A From B in Ember Some ideas to try before you go crazy Ben Donaldson, Crowdly
  • 2. Ember has many layers Like an onion Or a sandwich Or a skyscraper Or your LiveJournal
  • 3. Ember has many changes
  • 4. How do I talk between layers? Do those ways still work? Is it the “Ember Way”?
  • 5. How do I talk between layers? I’ll list a bunch of ways that I found Do those ways still work? Yes, at least for the last few weeks Is it the “Ember Way”? Until it stops working
  • 7. The List free to use!* *You agree, to the fullest extent permitted by law, to indemnify and hold harmless Ben Donaldson against all damages, liabilities or costs, including reasonable attorneys' fees and defense costs, to the extent caused by your negligent performance of professional services under this Agreement and that of anyone for whom you are legally liable. You agree, to the fullest extent permitted by law, to indemnify and hold harmless Ben Donaldson against all damages, liabilities or costs, including reasonable attorneys' fees and defense costs, to the extent caused by your negligent acts in connection with the Project and the acts of anyone for whom you are legally liable. Neither you or I shall be obligated to indemnify the other party in any manner whatsoever for the other party's negligence. Modifications to this Agreement. Ben Donaldson reserves the right to change or modify any of the terms and conditions contained in this Agreement at any time. You acknowledge and agree that it is your responsibility to review the Presentation and these Terms of Service from time to time. Your continued use of the Presentation after such modifications to this Agreement will constitute acknowledgment of the modified Terms of Service and agreement to abide and be bound by the modified Terms of Service. Unlike kangaroos and eucalyptus-eating possums, koalas are hindgut fermenters, and their digestive retention can last for up to 100 hours in the wild, or up to 200 hours in captivity. This is made possible by the extraordinary length of their caecum—200 cm (80 in) long and 10 cm (4 in) in diameter—the largest proportionally of any animal. Koalas can select which food particles to retain for longer fermentation and which to pass through. Large particles typically pass through more quickly, as they would take more time to digest. While the hindgut is proportionally larger in the koala than in other herbivores, only 10% of the animal's energy is obtained from fermentation. Since the koala gains a low amount of energy from its diet, its metabolic rate is half that of a typical mammal, although this can vary between seasons and sexes. The koala conserves water by passing relatively dry faecal pellets high in undigested fibre, and by storing water in the caecum.
  • 8. The List We’ll have two models, called Apple and Orange Each has their own route, controller, view, and template This is just for the simplest case
  • 9. When I’m AppleRoute… Apple (the model) this.modelFor(‘apple’) OrangeRoute this.get(‘router’).getHandler(‘orange’) AppleController this.controllerFor(‘apple’) AppleView - no idea Apple Template - no idea
  • 10. When I’m AppleController… Apple (the model) this.get(‘content’) (if it’s an Ember.ObjectController) AppleRoute this.get(‘target’) (if you’re currently on that route) OrangeController needs: [‘orange’] (in the root of AppleController) this.get(‘controllers.orange’) AppleView - no idea Apple Template - no idea
  • 11. When I’m AppleView… Apple (the model) this.get(‘context’) (if AppleController is an Ember.ObjectController) this.get(‘controller.content’) (if AppleController is an Ember.ObjectController) AppleRoute this.get(‘controller.target’) (if you’re currently on that route) AppleController this.get(‘controller’) OrangeView - no idea Apple Template this.get(‘template’) (for the handlebars function, but you wouldn’t touch that much) this.get(‘element’) (for the DOM element)
  • 12. When I’m the Apple Template… Apple (the model) this.get(‘view.context’) (if AppleController is an Ember.ObjectController) this.get(‘controller.content’) (if AppleController is an Ember.ObjectController) AppleRoute this.get(‘controller.target’) (if you’re currently on that route) AppleController this.get(‘controller’) AppleView this.get(‘view’) Orange Template - no idea
  • 13. In case of emergency... Warning: these are not “elegant” or “the Ember Way” but could “let you meet a deadline” Make an init function and make manual connections AppleView = Em.View.extend({ init: function() { this.get(‘controller’).set(‘yourAppleView’, this); } } Ask the almighty ‘container’, available pretty much everywhere in your app. this.get(‘container’).lookup(‘view:apple’)
  • 14. THANK YOU THESE SLIDES WILL BE ONLINE SOMEWHERE
  • 15. THANK YOU THESE SLIDES WILL BE ONLINE SOMEWHERE obligatory tech talk meme photo -->