Angular Material のサイトを参照して入れた時のメモ
##Step 1: Install Angular Material
npm install --save @angular/material
##Step 2: Animations
npm install --save @angular/animations
##Step 3: Include a theme
Available pre-built themes:
テーマの種類(4種類)
-deeppurple-amber.css
-indigo-pink.css
-pink-bluegrey.css
-purple-green.css
your styles.css file:
@import '~@angular/material/prebuilt-themes/deeppurple-amber.css';
タイプによって変える。
※index.htmlに入れるタイプの紹介もされているがエラーが解消せず。
##Step 5: Gesture Support
npm install --save hammerjs
your app's root module.
import 'hammerjs';
##Step 6 Add Material Icons
your index.html.
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
あとはComponent Library
を参照してパーツごとに入れる
モジュールあたりも追加するのでチェックを忘れずに。
webstorm使うと@NgModuleでMaterialModuleでImportsすると取り消し線がつくが入れないとうまく動かないので注意してください。
Step5と6は使うパーツによって入れたりだが、まあまあ使う印象だから入れておいて良いかも(6は必須で良いかも)。
以上