$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Angular New Router
Search
Tomoyuki Kashiro
April 09, 2015
Programming
2
190
Angular New Router
Tomoyuki Kashiro
April 09, 2015
Tweet
Share
Other Decks in Programming
See All in Programming
tparseでgo testの出力を見やすくする
utgwkk
2
220
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
190
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
400
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
360
なあ兄弟、 余白の意味を考えてから UI実装してくれ!
ktcryomm
11
11k
ハイパーメディア駆動アプリケーションとIslandアーキテクチャ: htmxによるWebアプリケーション開発と動的UIの局所的適用
nowaki28
0
420
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
150
認証・認可の基本を学ぼう後編
kouyuume
0
190
FluorTracer / RayTracingCamp11
kugimasa
0
230
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
8
2.4k
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
460
愛される翻訳の秘訣
kishikawakatsumi
3
320
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Making Projects Easy
brettharned
120
6.5k
Automating Front-end Workflow
addyosmani
1371
200k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Become a Pro
speakerdeck
PRO
31
5.7k
Transcript
ANGULAR NEW ROUTER
TOMOYUKI KASHIRO Twitter : @Tkashiro Github : @kashiro Freelance Web
Front-end Developer
http://goo.gl/MpnOiM
BASIC USAGE
DIRECTORY There is no way to change components (html and
javascript) path in the settings.
CONTROLLER app.js
COMPONENTS component/home/home.js
COMPONENTS component/home/home.html
HTML index.html ng-link=“home” : href=“/“ ng-link=“detail({id: ‘hoge’})” : href=“/detail/hoge“
NG-LINK
RESULT
SIBLING USAGE
SETTING Navigation Area Contents Area
/index.html Home Nav Home Contents
/detail/index.html Detail Nav Detail Contents
RESULT LEFT CONTENT RIGHT CONTENT
RESULT
HTML index.html
CONTROLLER
RESULT
OTHER USAGE
LIFE CYCLE HOOK You can hook routing life cycle (
e.g. activate / deactivate ) • Activate : useful to check login status • Deactivate : useful to check input validation
SUMMARY
• still have some inconvenient things. • new router is
still developing… • It will be useful to controlling routing. i think. • Let’s contribute :)