docs: Remove elvis operator from example where it didn't belong
closes #405 In the documentation, this section is discussing alternatives to the elvis operator. This particular section is supposed to be showing an alternative work around to the elvis operator, so this error is especially confusing.
This commit is contained in:
parent
758821c775
commit
007b4438a0
|
@ -1258,7 +1258,7 @@ code-example(format="" language="html").
|
||||||
We can code around that problem with [`ng-if`](#ng-if)
|
We can code around that problem with [`ng-if`](#ng-if)
|
||||||
code-example(format="" language="html").
|
code-example(format="" language="html").
|
||||||
<!-- No hero, div not displayed, no error -->
|
<!-- No hero, div not displayed, no error -->
|
||||||
<div *ng-if="nullHero">The null hero's name is {{nullHero?.firstName}}</div>
|
<div *ng-if="nullHero">The null hero's name is {{nullHero.firstName}}</div>
|
||||||
:marked
|
:marked
|
||||||
This approach has merit but it’s cumbersome, especially if the property path is long.
|
This approach has merit but it’s cumbersome, especially if the property path is long.
|
||||||
Imagine guarding against a null somewhere in a long property path such as `a.b.c.d`.
|
Imagine guarding against a null somewhere in a long property path such as `a.b.c.d`.
|
||||||
|
|
Loading…
Reference in New Issue