我有一个使用 Angular 13 的项目,我想将其更新到 Angular 14。
当我尝试更新时:
ng update @angular/core@14 @angular/cli@14
Run Code Online (Sandbox Code Playgroud)
我得到:
Package "@angular-eslint/schematics" has an incompatible peer dependency to "@angular/cli" (requires ">= 13.0.0 < 14.0.0", would install "14.0.1").
Run Code Online (Sandbox Code Playgroud)
关于如何避免此错误的任何想法?
我正在使用 Angular 12,在我的 component.html 中,我需要有一个 3 级条件。
例如:
我有一个列表,我需要检查它是否包含字符串。
true 和 false 状态都有不同的输出,最后我需要针对任何其他条件进行 ELSE。
所以......首先我有一个条件:
<div *ngIf="list.includes('sometext') && listitem === null ">Condition 1</div>
Run Code Online (Sandbox Code Playgroud)
现在的条件与上述相反:
<div *ngIf="!list.includes('sometext') && listitem === null ">Condition 2</div>
Run Code Online (Sandbox Code Playgroud)
最后是ELSE:
<div>Condition 3 or Any other condition from the others above</div>
Run Code Online (Sandbox Code Playgroud)
我怎样才能做到这一点?