[在将Toast组件与ng-bootstrap一起使用时出现错误

问题描述 投票:0回答:1

使用ng-bootstrap的Toast组件时出现以下错误

Uncaught Error: Template parse errors:
'ngb-toast' is not a known element:
1. If 'ngb-toast' is an Angular component, then verify that it is part of this module.
2. If 'ngb-toast' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

我的引导程序版本是

"@ng-bootstrap/ng-bootstrap": "^4.1.0",
"bootstrap": "^4.3.1",
angular angular-material angular7 angular-ui-bootstrap ng-bootstrap
1个回答
0
投票

您是否将其添加到app.module

 @NgModule({
    ...
    imports: [
       NgbModule
    ],
 })
© www.soinside.com 2019 - 2024. All rights reserved.