Pri*_*ati 1 carousel ng-bootstrap angular
我无法通过css隐藏ngb-carousel指示器和prev-next控件,以css类为目标是行不通的。是否可以隐藏它?
为了影响ng-bootstrap组件的css,必须禁用ViewEncapsulation。
从@ angular / core导入:
import { ViewEncapsulation } from '@angular/core'
Run Code Online (Sandbox Code Playgroud)
然后在@Component声明中对此组件禁用它:
@Component({
encapsulation: ViewEncapsulation.None,
selector: 'your-template-name',
styleUrls: ['your-template-name.component.scss'],
template: `
... `
})
Run Code Online (Sandbox Code Playgroud)
然后,您可以按预期在css文件中定位Bootstrap类等。
您想基于每个组件禁用此功能,并且仅在需要时才禁用。
| 归档时间: |
|
| 查看次数: |
1468 次 |
| 最近记录: |