Mudanças entre as edições de "Installing Angular Material"
De Basef
Linha 8: | Linha 8: | ||
Go to your index.html and add this inside '''<head>''': | Go to your index.html and add this inside '''<head>''': | ||
− | <source lang=" | + | <source lang="xml"> |
<link href="https://fonts.goggleapis.com/icon?family=Material+Icons" rel="stylesheet" /> | <link href="https://fonts.goggleapis.com/icon?family=Material+Icons" rel="stylesheet" /> | ||
</source> | </source> | ||
− | You may also need to import Angular Animations: | + | Go to your modules file and import '''MaterialModule''': |
+ | |||
+ | <source lang="javascript"> | ||
+ | import { MaterialModule } from '@angular/material'; | ||
+ | </source> | ||
+ | |||
+ | |||
+ | 2) You may also need to import Angular Animations: | ||
<source lang="bash"> | <source lang="bash"> | ||
Linha 18: | Linha 25: | ||
</source> | </source> | ||
− | And also gestures library: | + | Go to your modules file and import '''BrowserAnimationsModule''': |
+ | |||
+ | <source lang="javascript"> | ||
+ | import { BrowserAnimationsModule } from '@angular/platform-browser'; | ||
+ | </source> | ||
+ | |||
+ | 3) And also gestures library: | ||
<source lang="bash"> | <source lang="bash"> | ||
Linha 24: | Linha 37: | ||
</source> | </source> | ||
− | Also, you may install Angular Flex layout: | + | Go to your modules file and import '''BrowserAnimationsModule''': |
+ | |||
+ | <source lang="javascript"> | ||
+ | import 'hammerjs'; | ||
+ | </source> | ||
+ | |||
+ | 4) Also, you may install Angular Flex layout: | ||
<source lang="bash"> | <source lang="bash"> | ||
npm install --save @angular/flex-layout | npm install --save @angular/flex-layout |
Edição das 14h33min de 26 de abril de 2018
Angular Material has some great components ready to use in your project: https://material.angular.io/
1) Install Angular Material
npm install --save @angular/material
Go to your index.html and add this inside <head>:
<link href="https://fonts.goggleapis.com/icon?family=Material+Icons" rel="stylesheet" />
Go to your modules file and import MaterialModule:
import { MaterialModule } from '@angular/material';
2) You may also need to import Angular Animations:
npm install --save @angular/animations
Go to your modules file and import BrowserAnimationsModule:
import { BrowserAnimationsModule } from '@angular/platform-browser';
3) And also gestures library:
npm install --save hammerjs
Go to your modules file and import BrowserAnimationsModule:
import 'hammerjs';
4) Also, you may install Angular Flex layout:
npm install --save @angular/flex-layout