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
140
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
81
Meetup Go - Como construi o uhuraapp.com
dukex
4
720
Realtime - Usando o MeteorJS
dukex
3
650
Como fazer API melhor que o governo?
dukex
1
740
Raspagem de Dados com Ruby
dukex
1
990
Grid System com Amor
dukex
0
750
Abrindo Dados na unha
dukex
1
120
Other Decks in Programming
See All in Programming
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
480
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
16
3.7k
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
630
なぜ関数型プログラミングで「型」と「証明」が語られるのか #fp_matsuri
kajitack
3
1.1k
Claude Team Plan導入・ガイド
tk3fftk
0
250
AI時代、エンジニアはどう育つのか -未経験エンジニアの成長を間近で見て考えたこと-
thasu0123
0
210
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
17k
Apache Hive: そしてCloud Native Lakehouseへ
okumin
1
190
音楽のための関数型プログラミング言語mimiumにおける多段階計算の活用
tomoyanonymous
1
380
作るコストが小さくなった時代 幸せに働くために改めて考えたいこと 〜エンジニアとして価値を出し続けるために注視している二分野〜
yuppeeng
0
160
5分で問診!Composer セキュリティ健康診断
codmoninc
0
770
「正の参照」と 「負の導出」で組む ハーネスエンジニアリング
cottpan
1
150
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
34
9.6k
Fireside Chat
paigeccino
42
4k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.3k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Claude Code のすすめ
schroneko
67
230k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
WCS-LA-2024
lcolladotor
0
780
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
Paper Plane
katiecoart
PRO
2
52k
Tell your own story through comics
letsgokoyo
1
1k
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