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
Angular 2 次に覚えたいフィーチャー
Search
OKUNOKENTARO
April 10, 2016
Programming
2
750
Angular 2 次に覚えたいフィーチャー
2016/4、Angular 2ハンズオン勉強会にて使用した資料です。
OKUNOKENTARO
April 10, 2016
Tweet
Share
More Decks by OKUNOKENTARO
See All by OKUNOKENTARO
トレタO/X アーキテクチャ移行記 Next.js App Router化への道のり / TORETA TECH UPDATE 1
okunokentaro
5
11k
Podcastを継続する技術 / refactoradio-240119
okunokentaro
1
190
Webアプリケーション設計の第一歩は ディレクトリの整理から / Encraft 1
okunokentaro
34
10k
JSONとJSON Schemaを改めて理解する / tokyo_study
okunokentaro
9
2.4k
それでもどうしてRecoilを使うのか / Harajuku.ts Meetup Recoil
okunokentaro
19
5.6k
TypeScriptは10年でこんなに進化しました / TechFeed Experts Night 11
okunokentaro
6
1.8k
Hasura.io RDBをサクサク作る方法はARやO/RMだけじゃなくなりました/hasura-io
okunokentaro
5
690
コードには型アノテーションよりも要件アノテーションを増やせ!/harajukuts2
okunokentaro
14
6.4k
10年と3ヶ月でWebサービスを作った話 / Piyogrammer Conference 2021
okunokentaro
2
1.1k
Other Decks in Programming
See All in Programming
PHPに関数型の魂を宿す〜PHP 8.5 で実現する堅牢なコードとは〜 #phpcon_hiroshima / phpcon-hiroshima-2025
shogogg
1
150
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
310
Server Side Kotlin Meetup vol.16: 内部動作を理解して ハイパフォーマンスなサーバサイド Kotlin アプリケーションを書こう
ternbusty
3
180
なぜGoのジェネリクスはこの形なのか? Featherweight Goが明かす設計の核心
ryotaros
7
1.1k
バッチ処理を「状態の記録」から「事実の記録」へ
panda728
PRO
0
150
GraphQL×Railsアプリのデータベース負荷分散 - 月間3,000万人利用サービスを無停止で
koxya
1
1.3k
あなたとKaigi on Rails / Kaigi on Rails + You
shimoju
0
130
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
31k
dynamic!
moro
10
7.4k
階層構造を表現するデータ構造とリファクタリング 〜1年で10倍成長したプロダクトの変化と課題〜
yuhisatoxxx
3
1k
ソフトウェア設計の実践的な考え方
masuda220
PRO
4
560
Django Ninja による API 開発効率化とリプレースの実践
kashewnuts
0
1.3k
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
49
51k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.1k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
900
Facilitating Awesome Meetings
lara
56
6.6k
Large-scale JavaScript Application Architecture
addyosmani
514
110k
Music & Morning Musume
bryan
46
6.8k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.5k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
19
1.2k
Transcript
Angular 2 次に覚えたいフィーチャー Apr 10, Apr 16 2016 東西合同開催 Angular
2 ハンズオン
@armorik83 はちさん
今回のハンズオンでは Angular 2の入門的なAPIを 扱っていきました
次に覚えておくとよい 機能や特徴について まとめました ググるときのヒントに使ってね
templateUrl • @Component()のtemplateをtemplateUrlにして、 そこにパスを書くことで、テンプレートは別ファイル として扱える @Component({ selector: 'my-app', providers: [],
templateUrl: 'app.component.html', directives: [] })
styles • @Component()のstylesプロパティに 文字列の配列を与えると、そのコンポーネントにのみ 適用できるスタイルシートを記述できる @Component({ selector: 'hero-app', template: `
<h1>Tour of Heroes</h1> <hero-app-main [hero]=hero></hero-app-main>`, styles: ['h1 { font-weight: normal; }'], directives: [HeroAppMainComponent] }) https://angular.io/docs/ts/latest/guide/component-styles.html
styleUrls • @Component()のstylesの外部ファイル参照版 styleUrlsというのもある @Component({ selector: 'hero-details', template: ` <h2>{{hero.name}}</h2>
<hero-team [hero]=hero></hero-team> <ng-content></ng-content> `, styleUrls: ['app/hero-details.component.css'], directives: [HeroTeamComponent] })
Pipe • Angular 1でいうFilterは使いやすく、実装もしやすい Pipeになった • 文字列を変換するPipeや、数値を変換するPipe、 日付や金額を扱うPipeなど最初から色々入っている https://angular.io/docs/ts/latest/guide/pipes.html
読んでおくといいページ • Angular 1経験者には、2との違いが一覧表に なっているANGULAR 1 TO 2 QUICK REFERENCEを
オススメ https://angular.io/docs/ts/latest/cookbook/a1-a2-quick-reference.html • Angular 2のテンプレート構文をド忘れしたときは ANGULAR CHEAT SHEETをオススメ https://angular.io/docs/ts/latest/cheatsheet.html
楽しいAngular 2ライフを お過ごしください