ng-bootstrap Modal size

前端 未结 9 2171
抹茶落季
抹茶落季 2020-12-29 18:25

What is the best way to set/override a custom width for a modal?

It seems ng-bootstrap currently supports

size: \'sm\' | \'lg\'

9条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-29 19:17

    In addition to djpalme and Kapil Thakkar answers, you will need to set the 'encapsulation' of your Component to None as mentioned here

    @Component({
        selector: 'app-generic-view',
        templateUrl: './generic-view.component.html',
        styleUrls: ['./generic-view.component.scss'],
        encapsulation: ViewEncapsulation.None
    })
    

提交回复
热议问题