无法解析' l'(?)的所有参数。确保所有参数都使用Inject进行修饰或具有有效的类型注释,并且“' l'用Injectable装饰。 以下是我的代码
import { Component, OnInit } from '@angular/core';
import { ItemModalComponent } from './item-modal/item-modal.component';
import { BsModalRef } from 'ngx-bootstrap/modal/modal-options.class';
import { BsModalService } from 'ngx-bootstrap/modal/bs-modal.service';
@Component({
selector: 'app-items',
templateUrl: 'items.component.html',
styleUrls: ['./items.component.scss']
})
export class ItemsComponent implements OnInit {
bsModalRef: BsModalRef;
constructor(private modalService: BsModalService) {}
openItemModal() {
this.bsModalRef = this.modalService.show(ItemModalComponent, {class:
'modal-lg'});
console.log(this.bsModalRef);
this.bsModalRef.content.title = 'New Item';
}
ngOnInit() { }
}
答案 0 :(得分:0)
您使用的是哪种角度版本?删除现有节点模块并安装新模块。这可能会对你有所帮助