Components: Cannot find module @angular/material-moment-adapter

Created on 29 Aug 2018  路  3Comments  路  Source: angular/components

Bug:

An error is thrown on this line:
import {MAT_MOMENT_DATE_FORMATS, MomentDateAdapter} from '@angular/material-moment-adapter';

The error is:

Cannot find module '@angular/material-moment-adapter';'

What is the expected behavior?

The module is found

What is the current behavior?

The module is not found

What are the steps to reproduce?

StackBlitz example for the website

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular: 6.0.7
angular/material: 6.4.2
Typescript: 3.0.1

Is there anything else we should know?

Another question, where is MatMomentDateModulelocated?

Most helpful comment

npm i @angular/material-moment-adapter

import { MatMomentDateModule, MomentDateAdapter } from "@angular/material-moment-adapter";

I'm sorry but I guess StackOverflow is better for questions...

All 3 comments

npm i @angular/material-moment-adapter

import { MatMomentDateModule, MomentDateAdapter } from "@angular/material-moment-adapter";

I'm sorry but I guess StackOverflow is better for questions...

And we also need to install moment
npm install moment --save

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

anderflash picture anderflash  路  59Comments

jelbourn picture jelbourn  路  171Comments

Daugoh picture Daugoh  路  79Comments

jelbourn picture jelbourn  路  132Comments

abdulkareemnalband picture abdulkareemnalband  路  165Comments