I am currently using angular 4, and I followed the link here about how to use Angular Material. This is what I have done so far:
app.module.ts
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import 'hammerjs';
imports: [
BrowserAnimationsModule
],
I included in my index.html the theme style
<head>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="../node_modules/@angular/material/prebuilt-themes/indigo-pink.css" rel="stylesheet">
</head>
component
<md-sidenav-container>
<md-sidenav>
un idee
</md-sidenav>
<!-- primary content -->
</md-sidenav-container>
But I am getting the error:
Unhandled Promise rejection: Template parse errors:
'md-sidenav' is not a known element:
1. If 'md-sidenav' is an Angular component, then verify that it is part of this module.
2. If 'md-sidenav' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
and the following warning
Could not find Angular Material core theme. Most Material components may not work as expected
Could anyone point out what I am doing wrong?