#check if string is empty on the html side

27 messages · Page 1 of 1 (latest)

spiral arch
#

What's the actual value of myvar?

gray tangle
#

value or type?

spiral arch
#

the value you're passing

gray tangle
#

a string to help identify people

spiral arch
#

And my text doesn't get shown?

gray tangle
#

yeah

#

i tried to use it without the empty string but that didnt work either

spiral arch
#

ng-container is not supposed to be shown

#

add a <p> element inside it, containing your text.

gray tangle
#

whoops forgot a part

#

small edit

#

should i add the <p> even though my text is in a <div>?

spiral arch
#

no

#

Detach exlamation point from name of the variable

gray tangle
#

so just a space right?

spiral arch
#

yes

gray tangle
#

still the same as before

spiral arch
#

add

<div>{{myvar}}</div>

under your current html and see if it gets printed

gray tangle
#

it does get printed

spiral arch
#

Recreate your issue on stackblitz, because at the moment I cannot.

gray tangle
#

stackblitz?

gray tangle
#

huh weird it works there but not on my machine

#

thanks

#

oh

#

i feel really dumb rn

#

on my machine i had a typo