View logic data binding?


I’ve got a JSON data set that needs to be sanitized in the view.

For instance if I’m creating a page template with an address; and my data has “street”:“123 fake st”, “street2”:"", “city”:“california”

How might i evaluate if street2 empty, don’t display in my view? (where as other data sets may have street2 available)

I understand that if it’s empty it won’t display, but the extra line break would mess up my view.



Try <div ng-if="data">...</div>


awww yiss! that works. Also found ng-show does the same/similar.