ng-exin v0.0.7
For help getting started with a new Angular app, check out the Angular CLI.
For existing apps, follow these steps to begin using Material.
Step 1: Install Exin Component
You can use either the npm or yarn command-line tool to install packages. Use whichever is appropriate for your project in the examples below.
NPM
npm install --save ng-exin
Step 2: Include a theme
Including a theme is required to apply all of the core and theme styles to your application.
To get started with a prebuilt theme, include one of Angular Material's prebuilt themes globally
in your application. If you're using the Angular CLI, you can add this to your styles.css
:
@import "~ng-exin/theming";
Step 3: Gesture Support
Some components (mat-slide-toggle
, mat-slider
, matTooltip
) rely on
HammerJS for gestures. In order to get the full feature-set of these
components, HammerJS must be loaded into the application.
You can add HammerJS to your application via npm, a CDN (such as the Google CDN), or served directly from your app.
To install via npm, use the following command:
NPM
npm install --save hammerjs
After installing, import it on your app's entry point (e.g. src/main.ts
).
import 'hammerjs';
Step 4 (Optional): Add Material Icons
If you want to use the mat-icon
component with the official
Material Design Icons, load the icon font in your index.html
.
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
For more information on using Material Icons, check out the Material Icons Guide.
Note that mat-icon
supports any font or svg icons; using Material Icons is one of many options.