【发布时间】:2019-09-10 21:38:19
【问题描述】:
我面临一个棘手的问题,即 angular 2 和黄金布局组件不接受高度百分比。 (但将宽度设置为 100% 有效)。 任何帮助深表感谢。
Plunker 在这里:http://plnkr.co/edit/tUQOev?p=preview
@Component({
selector: 'my-app',
providers: [TestService],
template: `
<div>
<h2>Value: {{testService.testValue}}</h2>
<div><button (click)="testService.add()">Change Value</button></div>
<div style class="layout" gl></div>
</div>
`,
styles: [
`
.layout{ width:100%; height:100%}
`
]
directives: [GlDirective]
})
- 当我给出布局时:宽度:100%; height : 400px - 它可以正常工作,如下所示
- 但是当我尝试给出高度时:100% 布局根本无法识别高度并且无法正确渲染。
非常感谢。
【问题讨论】:
标签: css angularjs angular height golden-layout