注释掉 <span *ngSwitchCase="-1">↓</span>
不会报错。
<span class="pull-left ranking-movement" [ngSwitch]="profile.rankingMovement">
<span *ngSwitchCase="1">↑</span>
<span *ngSwitchCase="0">─</span>
<span *ngSwitchCase="-1">↓</span>
</span>
ngSwitchCase
不支持负数吗?以下是错误信息:
main.js?v1:23062 Unhandled Promise rejection: Template parse errors:
Parser Error: Unexpected token 1, expected identifier, keyword, or string at column 15 in [ngSwitchCase -1] in MainComponent@93:42 (" <span *ngSwitchCase="0">─</span>
<span [ERROR ->]*ngSwitchCase="-1">↓</span>
</span>
"): MainComponent@93:42
Parser Error: Unexpected token 1, expected identifier, keyword, or string at column 15 in [ngSwitchCase -1] in MainComponent@93:42
我正在使用RC.6版本。