大佬教程收集整理的这篇文章主要介绍了角材料2配置错误,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我做了什么
npm install –save @ angular / material
.....other imports import { MaterialModule } from '@angular/material'; @NgModule({ declarations: [ AppComponent ],imports: [ MaterialModule.forRoot(),other imports... ],providers: [],bootstrap: [AppComponent] }) export class AppModule { }
其他设置
styles.css的
@import’~@angular/material/core/theming/prebuilt/deeppurple-Amber.css’;
的index.html
... <script src="https://ajax.googleapis.com/ajax/libs/hammerjs/2.0.8/hammer.min.js"></script> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> ...
警告
1. WARNING in ./~/@angular/material/module.js 64:4 export 'ProjectionModule' was not foun d in './core/index' 2. WARNING in ./~/@angular/material/module.js 89:16 export 'ProjectionModule' was not fou nd in './core/index' 3. WARNING in ./~/@angular/material/dialog/ind ex.js 21:75 export 'Platform' was not found in '. ./core'
Uncaught TypeError: Cannot read property 'prototype' of undefined at __extends (snack-bar-container.js:4) at snack-bar-container.js:28 at Object.<anonymous> (snack-bar-container.js:122) at __webpack_require__ (bootstrap 9ff6af8…:52) at Object.<anonymous> (snack-bar-ref.js:70) at __webpack_require__ (bootstrap 9ff6af8…:52) at Object.<anonymous> (menu.js:40) at __webpack_require__ (bootstrap 9ff6af8…:52) at Object.<anonymous> (icon.js:264) at __webpack_require__ (bootstrap 9ff6af8…:52)
以上是大佬教程为你收集整理的角材料2配置错误全部内容,希望文章能够帮你解决角材料2配置错误所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。