简体   繁体   English

无法识别@angular/material?

[英]Unable to recognize @angular/material?

I'm using stackblitz to compile an Angular application and I also added @angular/material in the dependencies.我正在使用stackblitz编译一个 Angular 应用程序,我还在依赖项中添加了@angular/material I don't know why the compiler wont recognize the dependency I installed.我不知道为什么编译器无法识别我安装的依赖项。

在此处输入图片说明

You have to import the modules from the correct location您必须从正确的位置导入模块

import {MatDatepickerModule} from '@angular/material/datepicker';
import {MatNativeDateModule} from '@angular/material/core';

Here is a Stackblitz which I forked from your example这是我从你的例子中分叉出来的Stackblitz

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM