cookbook - 1 to 2 初译完毕
This commit is contained in:
parent
1a66785970
commit
58dec1f30c
|
@ -1973,7 +1973,7 @@ block remember-the-brackets
|
|||
That syntax assigns the *string* value "currentHero" to `ngIf`.
|
||||
In JavaScript a non-empty string is a truthy value, so `ngIf` would always be
|
||||
`true` and Angular would always display the `hero-detail`
|
||||
… even when there is no `currentHero`!
|
||||
... even when there is no `currentHero`!
|
||||
|
||||
不要误写为`ngIf="currentHero"`!
|
||||
这种语法会把一个字符串"currentHero"赋值给`ngIf`。
|
||||
|
|
Loading…
Reference in New Issue