문서의 이전 판입니다!
Angular Project에 Angular Material을 추가 설치하려면
npm install --save @angular/material @angular/cdk @angular/animations 또는 ng add @angular/material
Component Segments
| Name | Description |
|---|---|
| address-form | Component with a form group that uses Material Design form controls to prompt for a shipping address |
| navigation | Creates a component with a responsive Material Design sidenav and a toolbar for showing the app name |
| dashboard | Component with multiple Material Design cards and menus which are aligned in a grid layout |
| table | Generates a component with a Material Design data table that supports sorting and pagination |
| tree | Component that interactively visualizes a nested folder structure by using the <mat-tree> component |
Additionally @angular/CDK
| Name | Description |
|---|---|
| drag-drop | Component that uses the @angular/cdk/drag-drop directives for creating an interactive to-do list |
Address form schematic
ng generate @angular/material:address-form <component-name> ng generate @angular/material:nav <component-name> ng generate @angular/material:table <component-name> ng generate @angular/material:dashboard <component-name> ng generate @angular/material:tree <component-name> ng generate @angular/cdk:drag-drop <component-name>
When you want more customization than a pre-built theme offers, you can create your own theme file. pre-built theme 제공보다 더 많은 사용자 정의가 필요한 경우, 자신만의 테마 파일을 작성할 수 있습니다.
A custom theme file does two things: 사용자 정의 테마 파일은 다음 두 가지 작업을 수행합니다.:
mat-core()
Sass mixin를 가져옵니다. 여기에는 여러 구성 요소가 사용하는 모든 공통 스타일이 포함됩니다. 이것은 응용 프로그램에 한 번만 포함되어야합니다. 이 mixin이 여러 번 포함되면 응용 프로그램이 이러한 공통 스타일의 여러 사본으로 끝납니다.
A typical theme file will look something like this:
icon https://material.io/tools/icons/?style=baseline css grid