首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >组织结构图不转义变量-角度7

组织结构图不转义变量-角度7
EN

Stack Overflow用户
提问于 2019-03-17 15:27:48
回答 1查看 372关注 0票数 0

使用PrimeNG高级组织结构图:https://www.primefaces.org/primeng/#/organizationchart

统计数据: Angular 7 Chrome Browser:当前版本

错误:

代码语言:javascript
运行
复制
    compiler.js:2430 Uncaught Error: Template parse errors:
Unexpected character "EOF" (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.) ("
    </ng-template>
</p-organizationChart>
</div>[ERROR ->]"): ng:///AppModule/OrdertreeComponent.html@16:6
Unexpected closing tag "ng-template". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags ("
            <div>{{node.data.name}}</div>
        </div>
    [ERROR ->]</ng-template>
    <ng-template let-node pTemplate="department">
      { { node.label } }
"): ng:///AppModule/OrdertreeComponent.html@11:4
Invalid ICU message. Missing '}'. ("
    </ng-template>

Html:

代码语言:javascript
运行
复制
    <p>Organization with advanced customization.</p>
<p-organizationChart [value]="data1" selectionMode="single" [(selection)]="selectedNode" (onNodeSelect)="onNodeSelect($event)" styleClass="company">
      <ng-template let-node pTemplate="person">
     <div class="node-header ui-corner-top">{{node.label}}/div>
        <div class="node-content">
            <img src="assets/showcase/images/demo/organization/{node.data.avatar}" width="32">
            <div>{{node.data.name}}</div>
        </div>
    </ng-template>
    <ng-template let-node pTemplate="department">
      { { node.label } }
    </ng-template>
</p-organizationChart>

尝试的修复:

我尝试对括号使用不同类型的转义方法,但实际上似乎什么都不起作用。我找不到任何与Angular 7相关的变化。

EN

回答 1

Stack Overflow用户

发布于 2019-07-22 04:34:18

将单大括号改为双大括号为我解决了这个问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55204788

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档