我正在处理Angular 6项目,其中angular-bootstrap-md
的配置已按文档中所述进行。
我的tsconfig.json
文件
{
"compileOnSave": false,
......
......
"include": ["src/**/*.ts", "node_modules/angular-bootstrap-md/**/*.ts"]
}
我的angular.json
文件
"styles": [
"node_modules/font-awesome/scss/font-awesome.scss",
"node_modules/angular-bootstrap-md/scss/bootstrap/bootstrap.scss",
"node_modules/angular-bootstrap-md/scss/mdb-free.scss",
"src/styles.scss"
],
"scripts": [
"node_modules/chart.js/dist/Chart.js",
"node_modules/hammerjs/hammer.min.js"
]
我的app.module.ts
文件
import { MDBBootstrapModule } from 'angular-bootstrap-md';
.......
......
@NgModule({
declarations: [
........
],
imports: [
BrowserModule,
AppRoutingModule,
HttpModule,
BrowserAnimationsModule,
MDBBootstrapModule.forRoot()
],
providers: [.....],
schemas: [NO_ERRORS_SCHEMA],
bootstrap: [AppComponent]
})
export class AppModule {}
我的MyComponent.component.html
文件
<button type="button" mdbBtn color="primary" mdbWavesEffect>Primary</button>
<button type="button" mdbBtn color="secondary" mdbWavesEffect>Secondary</button>
<button type="button" mdbBtn color="success" mdbWavesEffect>Success</button>
<button type="button" mdbBtn color="danger" mdbWavesEffect>Danger</button>
<button type="button" mdbBtn color="warning" mdbWavesEffect>Warning</button>
<button type="button" mdbBtn color="info" mdbWavesEffect>Info</button>
<button type="button" mdbBtn color="light" mdbWavesEffect>Light</button>
<button type="button" mdbBtn color="dark" mdbWavesEffect>Dark</button>
<button type="button" mdbBtn color="link">Link</button>
关于出什么问题了吗?该如何解决?