Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/200.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
Android 显示角度组件v2或v4的列表_Android_Angular_Ionic Framework_Components - Fatal编程技术网

Android 显示角度组件v2或v4的列表

Android 显示角度组件v2或v4的列表,android,angular,ionic-framework,components,Android,Angular,Ionic Framework,Components,我需要显示ts文件中的角度组件列表。我能做什么 // file ResolventePage.ts listFormulas: IFormula[] = [{ name: "Formula 1", description: "a description", element: AComponent1 }, { name: "Formula 2", description: "a description 2", element

我需要显示ts文件中的角度组件列表。我能做什么

  // file ResolventePage.ts

  listFormulas: IFormula[] = [{
     name: "Formula 1",
     description: "a description",
     element: AComponent1
  }, {
     name: "Formula 2",
     description: "a description 2",
     element: AComponent2
  }, ... ]
但我不知道如何在循环中动态放置它:

 <ion-item *ngFor="let item of listFormulas">
   <ion-label>{{ item.name }}</ion-label>

   <!-- Here I need to render the component "item.element" -->
 </ion-item>

{{item.name}

非常感谢您的帮助。

如果我正确理解了您的
列表公式中的每个
元素
,那么它就是和角度分量

选择1 首先导入.ts文件中的所有组件,例如:

从“/AComponent1”导入{AComponent1};
从“./AComponent2”导入{AComponent2};
// ...
然后试试这个快速破解:


{{item.name}
选择2 如果这不起作用,那么这里有一种适当但先进的方法来做到这一点。这是一个非常详细的官方文档的演示