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
Lightning Talk: Fluxo (básico) Ember 1.x.x
Search
Duke
July 24, 2015
Programming
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Lightning Talk: Fluxo (básico) Ember 1.x.x
Duke
July 24, 2015
More Decks by Duke
See All by Duke
Docker
dukex
0
100
Lightning Talk: Testes em Javascript
dukex
0
130
Concorrência em GO
dukex
0
82
Meetup Go - Como construi o uhuraapp.com
dukex
4
730
Realtime - Usando o MeteorJS
dukex
3
650
Como fazer API melhor que o governo?
dukex
1
750
Raspagem de Dados com Ruby
dukex
1
1k
Grid System com Amor
dukex
0
760
Abrindo Dados na unha
dukex
1
120
Other Decks in Programming
See All in Programming
Go 1.27からのGODEBUG / Go 1.27 リリースパーティ #go127party
mazrean
0
250
S3 を使うアプリケーションをローカル完結で動かすことに全力を注いでみた / Running S3 Apps Offline
contour_gara
0
660
Oxlintはいいぞ(続)
yug1224
1
480
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
2
390
My Marp Sample
sinoue0108
0
130
プロポーザルを書いてもらう
pvcresin
0
590
Dockerfile CMD for Node.js
grazie1999
0
140
Hono + Inertia + React で LP を構築した話
oukayuka
2
180
ALB ログから Trace を気合で繋げる技術
fohte
7
770
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
2
450
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
220
freeeにおけるEvalsの実践例の紹介
freee
PRO
0
160
Featured
See All Featured
Crafting Experiences
bethany
1
270
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
Accessibility Awareness
sabderemane
1
180
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
sira's awesome portfolio website redesign presentation
elsirapls
0
350
Making Projects Easy
brettharned
120
6.7k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
180
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.2k
GitHub's CSS Performance
jonrohan
1033
470k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
430
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
Transcript
Model Controller Route Template View
Model Route model(p, t) beforeModel(transition) afterModel(resolvedModel, transition) Promise Promise Promise
model () { return this.get('store').findAll('structural-context'); } afterModel (transition) { let
superResult = this._super(transition); return this.get('consumer').setup() .then(() => superResult); } Model Route
setupController(controller, model) setupController(controller, model) { let query = { structuralItemId:
model.get('structuralItemId') }; this.get('store').query('structural-widget', query).then((structuralWidgets) => { controller.set('structuralWidgets', structuralWidgets); }); this._super(controller, model); } Controller Route
renderTemplate(controller, model) sidebar: 'default', renderTemplate (controller, model) { this.render('sidebar', {
outlet: 'sidebar' }); this.render(`sidebar/${this.get('sidebar')}`, { outlet: 'sidebar-content', into: 'sidebar' }); this._super(controller, model); } Route View
Template View didInsertElement () { this._super(); Ember.run.scheduleOnce('afterRender', this, () =>
{ window.componentHandler.upgradeAllRegistered(); }); } MyView = Ember.View.extend({ classNames: ['my-class', 'my-other-class'] }); <div id="ember1" class="ember-view my-class my-other-class"></div> didInsertElement() willClearRender() willDestroyElement() willInsertElement()
Controller Template <div class="col-sm-3"> {{#if model.parent}} <h3>PAI:</h3> {{#linkTo "structural_contexts.structural_context" model.parent}}
{{model.parent.name}} ({{model.parent.structuralItemType}}) {{/linkTo}} {{/if}} </div> <h2 class="col-sm-5 text-center">{{model.name}} ({{model}})</h2>
Controller View didInsertElement: -> ... controller = @get('controller') rdpApi =
controller.get('rdpApi') config = controller.get('config') controller.get('features').set('go_to_page', null) ... Ember.$('.container').click ()-> controller.get('features').send('close') ... reader.on "error", (status)-> controller.send('invalidateSession') if status is 403