<ul [ngStyle]="{'width': widths? widths + 'px': widths + 'px'}"></ul> import * as $ from 'jquery'; this.widths = $('.search').width() - 89; ----------------------------------------------------------------------------------------------- $(".tabPanes").attr("height","300px"); ----------------------------------------------------------------------------------------------- this.setState({clientHeight: document.body.clientHeight-120}) ----------------------------------------------------------------------------------------------- style={{ height: this.state.contentWidth < 1366 ? // ? "632px" "auto" : this.state.contentHeight - 70 }}