Getting started with angular material 2

by Aliaksei Kuncevic

First Steps

  1. Explore Maerial 2 repo
  2. Get Doc Site working locally
  3. Explore official guides

Material 2 and cdk

Integration in to real app(angular cli)

NPM

npm install --save @angular/material @angular/cdk

Custom material module


import {MdButtonModule, MdCheckboxModule} from '@angular/material';

@NgModule({
  imports: [MdButtonModule, MdCheckboxModule],
  exports: [MdButtonModule, MdCheckboxModule],
})
export class CustomMaterialModule { }
					

Theming and typography

Custom theme

Guide

Material icons

OR

npm install material-design-icons --save
import 'material-design-icons/iconfont/material-icons.css

angular-cli.json


"styles": [],
"scripts": []
	  

Flex Layout

provides a sophisticated layout API using Flexbox CSS + mediaQuery

Links

https://material.google.com
https://material.angular.io
https://github.com/angular/material2
https://github.com/angular/flex-layout
https://tburleson-layouts-demos.firebaseapp.com/#/docs