angular2 html并不总是加载

时间:2017-05-27 08:59:35

标签: html css angular text loading

我正在使用角度,我遇到的问题是,当我的页面加载时,我的一些文本根本就不显示。只有在调整窗口大小后才会显示或刷新几次后。它也使用按钮文本执行此操作,但在此示例中使用<b>标记。下面是两个图像,第一个是文本没有铺设的图像,第二个是我调整窗口大小的时候,第三个是我放的时候?在方法中的每个值前面

感谢您的帮助!

Image with no text

Image with text on resize

Update

html代码:

<div id="title">
  <span>Stagevoorstellen</span>
</div>
  <div class="dropdowns">
    <div id="one">
      <b>Status voorstel</b>
      <select #selectedStatus class="form-control" (change)="checkStatus(selectedStatus.value)">
        <option value="ToApprove">Nog te keuren</option>
        <option value="Rejected">Afgekeurd</option>
      </select>
    </div>
    <div id="two">
      <div>
        <b>Afstudeerrichting</b>
        <select #selectedSpecialisation class="form-control" (change)="checkSpecialisation(selectedSpecialisation.value)">
          <option value="EVERYTHING">Alles</option>
          <option value="AON">Applicatieontwikkeling</option>
          <option value="SWM">Softwaremanagement</option>
          <option value="SNB">Systemen en netwerkbeheer</option>
        </select>
      </div>
    </div>
    <div id="three">
      <div>
        <b>Reviewer</b>
        <select #reviewerYesOrNo class="form-control" (change)="checkReviewerForNull(reviewerYesOrNo.value)">
          <option value="notAssigned">Niet toegekend</option>
          <option value="assigned">Toegekend</option>
        </select>
      </div>
    </div>
  </div>

1 个答案:

答案 0 :(得分:0)

试试这个:加?在每个.value之前标记

<div id="title">
  <span>Stagevoorstellen</span>
</div>
  <div class="dropdowns">
    <div id="one">
      <b>Status voorstel</b>
      <select #selectedStatus class="form-control" (change)="checkStatus(selectedStatus?.value)">
        <option value="ToApprove">Nog te keuren</option>
        <option value="Rejected">Afgekeurd</option>
      </select>
    </div>
    <div id="two">
      <div>
        <b>Afstudeerrichting</b>
        <select #selectedSpecialisation class="form-control" (change)="checkSpecialisation(selectedSpecialisation?.value)">
          <option value="EVERYTHING">Alles</option>
          <option value="AON">Applicatieontwikkeling</option>
          <option value="SWM">Softwaremanagement</option>
          <option value="SNB">Systemen en netwerkbeheer</option>
        </select>
      </div>
    </div>
    <div id="three">
      <div>
        <b>Reviewer</b>
        <select #reviewerYesOrNo class="form-control" (change)="checkReviewerForNull(reviewerYesOrNo?.value)">
          <option value="notAssigned">Niet toegekend</option>
          <option value="assigned">Toegekend</option>
        </select>
      </div>
    </div>
  </div>