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
740
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
170
Webアプリケーション設計の第一歩は ディレクトリの整理から / Encraft 1
okunokentaro
34
10k
JSONとJSON Schemaを改めて理解する / tokyo_study
okunokentaro
9
2.3k
それでもどうしてRecoilを使うのか / Harajuku.ts Meetup Recoil
okunokentaro
19
5.5k
TypeScriptは10年でこんなに進化しました / TechFeed Experts Night 11
okunokentaro
6
1.7k
Hasura.io RDBをサクサク作る方法はARやO/RMだけじゃなくなりました/hasura-io
okunokentaro
5
640
コードには型アノテーションよりも要件アノテーションを増やせ!/harajukuts2
okunokentaro
14
6.3k
10年と3ヶ月でWebサービスを作った話 / Piyogrammer Conference 2021
okunokentaro
2
1k
Other Decks in Programming
See All in Programming
『GO』アプリ データ基盤のログ収集システムコスト削減
mot_techtalk
0
110
SwiftUIで単方向アーキテクチャを導入して得られた成果
takuyaosawa
0
260
個人アプリを2年ぶりにアプデしたから褒めて / I just updated my personal app, praise me!
lovee
0
340
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
730
最近のVS Codeで気になるニュース 2025/01
74th
1
250
iOSエンジニアから始める visionOS アプリ開発
nao_randd
3
120
ペアーズでの、Langfuseを中心とした評価ドリブンなリリースサイクルのご紹介
fukubaka0825
2
300
Linux && Docker 研修/Linux && Docker training
forrep
23
4.5k
Grafana Loki によるサーバログのコスト削減
mot_techtalk
1
110
第3回 Snowflake 中部ユーザ会- dbt × Snowflake ハンズオン
hoto17296
4
360
負債になりにくいCSSをデザイナとつくるには?
fsubal
9
2.3k
Grafana Cloudとソラカメ
devoc
0
140
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
6
240
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
GitHub's CSS Performance
jonrohan
1030
460k
How STYLIGHT went responsive
nonsquared
98
5.3k
GraphQLとの向き合い方2022年版
quramy
44
13k
Producing Creativity
orderedlist
PRO
343
39k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
Visualization
eitanlees
146
15k
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ライフを お過ごしください