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
80
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
AIエージェントで 変わるAndroid開発環境
takahirom
1
350
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
350
霧の中の代数的エフェクト
funnyycat
1
140
エンジニアにデザインハーネスを 〜デザインプロセスを規定するためのハーネス〜 / Design harness from an engineer's perspective
rkaga
2
660
Performance Engineering for Everyone
elenatanasoiu
0
250
dRuby over BLE
makicamel
2
410
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
1k
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
1k
AI時代の仕事技芸論〜ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ(スクフェス仙台 2026バージョン)
kuranuki
0
170
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
170
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
210
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
360k
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Paper Plane
katiecoart
PRO
1
52k
Raft: Consensus for Rubyists
vanstee
141
7.6k
エンジニアに許された特別な時間の終わり
watany
107
250k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
180
Mobile First: as difficult as doing things right
swwweet
225
10k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
310
Building Applications with DynamoDB
mza
96
7.1k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.5k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
210
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
760
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