$30 off During Our Annual Pro Sale. View Details »
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
30分でDoctrineの仕組みと使い方を完全にマスターする / phpconkagawa 2025 Doctrine
ttskch
3
740
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
240
WebRTC、 綺麗に見るか滑らかに見るか
sublimer
1
150
[SF Ruby Conf 2025] Rails X
palkan
0
450
TVerのWeb内製化 - 開発スピードと品質を両立させるまでの道のり
techtver
PRO
3
1.4k
FluorTracer / RayTracingCamp11
kugimasa
0
200
認証・認可の基本を学ぼう前編
kouyuume
0
160
社内オペレーション改善のためのTypeScript / TSKaigi Hokuriku 2025
dachi023
1
500
大体よく分かるscala.collection.immutable.HashMap ~ Compressed Hash-Array Mapped Prefix-tree (CHAMP) ~
matsu_chara
1
210
How Software Deployment tools have changed in the past 20 years
geshan
0
28k
手が足りない!兼業データエンジニアに必要だったアーキテクチャと立ち回り
zinkosuke
0
410
エディターってAIで操作できるんだぜ
kis9a
0
660
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Into the Great Unknown - MozCon
thekraken
40
2.2k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Why Our Code Smells
bkeepers
PRO
340
57k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Music & Morning Musume
bryan
46
7k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
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ライフを お過ごしください