The disappearing canvas: a word on copying sample code from Angular Material

Hopefully this saves someone else the same headache it caused me:

If you copy code samples from Angular Material examples, make sure to remove the “ng -cloak” class from the outer container elements, or else your canvas will disappear at runtime!

The “ng-cloak” class has one property, and that’s “display: none”– I’m not sure why it’s included in so many of the example code snippets, but something tells me I’m missing something (like maybe a script that sets it visible at runtime?). 

I don’t care to admit how long I hit my head against the wall trying to figure out why the entire canvas disappeared at runtime until I checked the CSS. I just assumed my angular code wasn’t working. 

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s