canjs / can-stache

Live binding handlebars templates
https://canjs.com/doc/can-stache.html
MIT License
10 stars 13 forks source link

Write out empty blocks #662

Open justinbmeyer opened 5 years ago

justinbmeyer commented 5 years ago

image

Angular does this for its if directive.

matthewp commented 5 years ago

Aren't these written out as textnodes currently? Is this issue to replace that with comments?

justinbmeyer commented 5 years ago

Yeah, it’s nicer debug experience IMO. You can see something.

matthewp commented 5 years ago

Ok, I agree then. This is what portals does in the spot within the template where it was used. I used canReflect.getName() on the observable so it looks like this:

screen shot 2019-01-14 at 4 32 57 pm