material angular code example

Example 1: angular npm angular material

npm i @angular/material

Example 2: angular material

//To take advantage of Angular Material install it in the terminal
$ ng add @angular/material
//Choose the options that will be presented to you

Example 3: Angular material design

/* Answer to: "Angular material design" */

/*
  Angular Material is a UI component library for Angular JS
  developers. Angular Material components help in constructing
  attractive, consistent, and functional web pages and web
  applications while adhering to modern web design principles like
  browser portability, device independence, and graceful degradation.
  
  Main Website: https://material.angular.io/
  
  Get started here: https://material.angular.io/guide/getting-started
  
  For examples on usage of this library go to:
  https://material.angular.io/components/
*/

Example 4: como configurar los estilos para utilizar angular material

/* Crear un archivo de estilos styles.scss
   Agregar el tema que se desea. */
@import '~@angular/material/prebuilt-themes/indigo-pink.css';
html, body { /* Hacer los cambios de estilo deseados */
  margin: 2px;
  padding: 1px;
}
body{
  background-color: #f3f3f3;
  font-family: Roboto, 'Helvetice New', 'Arial', sans-serif
}
/* En angular-cli.json agregar el archivo de estilos 
   recién creado. */
"styles": [ 
  "styles.scss" 
]