1.某天用到组件通讯时,报了个错 @Output doSomething not initialized in xxComponent,反复检查代码,doSomething是有声明的,百思不得其解,后来想起来,在引入EventEmitter的时候有vscode弹窗说是否引入EventEmitter,点击了确定,这时的引入源是 import {EventEmitter} from "events",将其改成 …… from "@angular/core" 就对了
angular踩坑
2023-11-26 22:39:34