Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.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
Angular SVG中的角度函数调用_Angular_Svg - Fatal编程技术网

Angular SVG中的角度函数调用

Angular SVG中的角度函数调用,angular,svg,Angular,Svg,我正在创建一个Angular应用程序,我想显示我编写的函数average中的值 <svg *ngFor="let item of items;" width="500" height="75"> <circle cx="50" cy="50" r="20" [attr.fill]="item.color" /> <text x="100" y="50">"average(item.count)"% {{item.name}}</text>

我正在创建一个Angular应用程序,我想显示我编写的函数average中的值

<svg *ngFor="let item of items;" width="500" height="75">
  <circle cx="50" cy="50" r="20" [attr.fill]="item.color" />
  <text x="100" y="50">"average(item.count)"% {{item.name}}</text>
</svg> 
是否可以在svg文本中获得平均函数调用的实际值

如果没有,有人能给我指出一个正确的方向,我可以在哪里找到答案


谢谢

只需像这样使用插值:

{{averageitem.count}}%{{item.name}
但请记住,您的平均函数将在每个更改检测周期中执行。因此,也许为这一点准备数据是值得的。

@yurzui I没有。。谢谢