简体   繁体   English

错误 Angular 未捕获类型错误:无法在引导时读取未定义的属性“绑定”

[英]Error Angular Uncaught TypeError: Cannot read property 'bind' of undefined at bootstrap

enter image description here在此处输入图像描述

when doing ng serve to run my project I am getting this error当做 ng serve 运行我的项目时,我收到了这个错误

If you are using ng-bootstrap then uninstall and install it again如果您使用的是ng-bootstrap ,请卸载并重新安装

npm uninstall @ng-bootstrap/ng-bootstrap --save

then然后

npm install @ng-bootstrap/ng-bootstrap --save

also, be sure that you imported the另外,请确保您导入了

import { NgbModule } from "@ng-bootstrap/ng-bootstrap";

in the subject Module.ts file (probably app.Module.ts )在主题Module.ts文件中(可能是app.Module.ts

as well as mentioned in the imports array以及导入数组中提到的

  imports: [
    ...
    NgbModule,
    ...
  ],

However, if you are using the traditional bootstrap be sure you did put the related @import statement in styles.css file Example但是,如果您使用的是传统引导程序,请确保您确实将相关的@import语句放入styles.css文件示例

@import "~bootstrap/dist/css/bootstrap.css";

Trying doing an npm install bootstrap again.尝试再次执行npm install bootstrap Maybe there was an issue that occurred during the npm installation可能在npm安装过程中出现问题

暂无
暂无

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

相关问题 Angular 2 ng-bootstrap,NgbTabset错误:未捕获(承诺):TypeError:无法读取未定义的属性“ templateRef” - Angular 2 ng-bootstrap,NgbTabset Error:Uncaught (in promise): TypeError: Cannot read property 'templateRef' of undefined Uncaught TypeError:无法读取backend.js中未定义的属性“ bind” - Uncaught TypeError: Cannot read property 'bind' of undefined in backend.js 错误TypeError:无法读取undefined |的属性“0” Angular 4 - ERROR TypeError: Cannot read property '0' of undefined | Angular 4 Angular:ERROR TypeError:无法读取undefined的属性___ - Angular: ERROR TypeError: Cannot read property ___ of undefined 未捕获(承诺):类型错误:无法读取 angular2+ 中未定义的属性“get” - Uncaught (in promise): TypeError: Cannot read property 'get' of undefined in angular2+ 未捕获的TypeError:无法读取未定义的属性'fn',电子2,角6? - Uncaught TypeError: Cannot read property 'fn' of undefined, electron 2, angular 6? Amcharts angular:未被捕获的TypeError:无法读取未定义的属性“ Directive” - Amcharts angular : Uncaught TypeError: Cannot read property 'Directive' of undefined 未捕获(承诺):类型错误:无法读取角度 10 中未定义的属性“ɵcmp” - Uncaught (in promise): TypeError: Cannot read property 'ɵcmp' of undefined in angular 10 angular/rxjs observable Uncaught TypeError:无法读取未定义的属性“isStopped” - angular/rxjs observable Uncaught TypeError: Cannot read property 'isStopped' of undefined Angular 4.0.3:Uncaught TypeError:无法读取undefined的属性'apply' - Angular 4.0.3: Uncaught TypeError: Cannot read property 'apply' of undefined
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM