Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bootstrap 4手风琴和ngFor的angular4? {{customeOffer.name}_Angular_Bootstrap 4_Accordion - Fatal编程技术网

Bootstrap 4手风琴和ngFor的angular4? {{customeOffer.name}

Bootstrap 4手风琴和ngFor的angular4? {{customeOffer.name},angular,bootstrap-4,accordion,Angular,Bootstrap 4,Accordion,我的ngFor手风琴不工作。它发出错误。有人能告诉我吗。请帮助。提前感谢。正如您所提到的,您的ngFor不工作,如果您收到此错误 模板分析错误:无法绑定到“ngFor”,因为它不是已知的 元素的属性 问题是:*ngFor=“customOfferData的customeOffer” 您错过了let关键字*ngFor=“let customeOffer of customOfferData” 参考资料:ngFor循环的语法是 *ngFor=“数组的let变量” 因此,在您的情况下,语法如下: &l

我的ngFor手风琴不工作。它发出错误。有人能告诉我吗。请帮助。提前感谢。

正如您所提到的,您的
ngFor
不工作,如果您收到此错误

模板分析错误:无法绑定到“ngFor”,因为它不是已知的
元素的属性

问题是:
*ngFor=“customOfferData的customeOffer”

您错过了
let
关键字
*ngFor=“let customeOffer of customOfferData”


参考资料:

ngFor循环的语法是 *ngFor=“数组的let变量”

因此,在您的情况下,语法如下:

<div id="accordion" role="tablist" aria-multiselectable="true" *ngFor="customeOffer of customOfferData">
        <div class="card">
              <div class="card-header" role="tab" id="headingThree">
                <h5 class="mb-0">
                 {{customeOffer.name}}
               </h5>
           </div>
      </div>
</div>

张贴你的错误你错过了很多东西,需要引导4手风琴。请检查一下,你能帮我解决这个问题吗
*ngFor="let customeOffer of customOfferData"