如何将ngb分页集中在angular4中?

如何将ngb分页集中在angular4中?,angular,ng-bootstrap,Angular,Ng Bootstrap,我的项目使用ng引导和angular 4,上面的代码没有居中分页组件。有没有办法让它居中?谢谢你的帮助。试着这样做: template.html <div class="col-12 text-center"> <ngb-pagination [collectionSize]="120" [(page)]="pageNumber" [maxSize]="5" [rotate]="true" [boundaryLinks]="true" size="lg">

我的项目使用ng引导和angular 4,上面的代码没有居中分页组件。有没有办法让它居中?谢谢你的帮助。

试着这样做:

template.html

<div class="col-12 text-center">
  <ngb-pagination [collectionSize]="120" [(page)]="pageNumber" 
   [maxSize]="5" [rotate]="true" [boundaryLinks]="true" size="lg">
  </ngb-pagination>
</div>

现在使用Bootstrap4,您可以只使用bootstrap类


<div class="col-12 justify-content-center">
  <ngb-pagination [collectionSize]="120" [(page)]="pageNumber" 
   [maxSize]="5" [rotate]="true" [boundaryLinks]="true" size="lg">
  </ngb-pagination>
</div>
.justify-content-center {
    display: flex !important;
    justify-content: center !important;
}