我试图在我的Ionic 2 / Angular 2应用程序中使用ngx-bootstrap,由于某种原因,popover在我的视图中无法正确显示:
<button
placement="right"
[outsideClick]="true"
popover="this is a teseofnwifo ef efo efoih wefohwefo wef h ioef whefhweofihwoeht"
[isOpen]="true"
triggers="click"
ion-button full outline
class="flex-col rounded box-shadow"
color="primary"
style="height:100%;font-size:16px;border-width:1px;"
(click)="goTo('new-client')" #1>
<i class="fa fa-user-plus text-shadow" padding style="font-size: 150px;color:red;"></i>
<span style="font-size:32px;text-transform:none;">New Client</span>
</button>
我不相信我的按钮样式会影响弹出窗口,因为它呈现为单独的组件,但是当显示弹出框时,它的width
和height
都设置为4px。我不知道它在哪里设置或者我在某处错过了一些javascript ..
app.module.ts
import { PopoverModule } from 'ngx-bootstrap/popover';
@NgModule({
declarations: [...],
imports: [
PopoverModule.forRoot()
]
...
})
设置container =“body”,如demo:https://valor-software.com/ngx-bootstrap/#/popover#container-body
如果它将修复大小,那么某些东西正在影响popover风格