The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Angular Material: Installing with NPM

Angular Material: Installing with NPM

1:56
Learn how to install Angular Material with `npm install` and load the required libraries and stylesheets into your blank web page. > This course has been created by Thomas Burleson and Aaron Frost
Watch this lesson now
Avatar
egghead.io

Learn how to install Angular Material with npm install and load the required libraries and stylesheets into your blank web page.

This course has been created by Thomas Burleson and Aaron Frost

Avatar
Mauro

If I am not missing something you should add animate and aria manually as well:

npm i -S angular angular-animate angular-aria angular-material
In reply to egghead.io
Avatar
Aaron

npm installs any peerDependencies that a library specifies. So you don't have to install them by hand. npm takes care of it for you.

In reply to Mauro
Avatar

Good catch Mauro, the peer dependencies no longer work. I had to manually add animate and aria as well.

In reply to Mauro
Avatar
mark

Getting an error in Angular 1.5 with webpack.

using this:
import 'angular-material/angular-material.css';

give the following error:
ERROR in ./~/angular-material/angular-material.css
Module parse failed: /Users/mark/Documents/my-project/node_modules/angular-material/angular-material.css Unexpected token (7:11)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (7:11)

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?