angular-ui/ui-router — pull request #557 by JonRimmer (2013-11-04 22:12:46+00:00)
Title: Don't render a view for empty content

Speculative fix for #534.

My original plan to revert to the old-style behaviour proved impossible: The ngAnimate module in 1.2 will only apply animations on the ui-view element itself, based on its class attribute, meaning the element must participate in the cloning/adding/removing process.

Instead, I have modified the directive to not render anything if both the view template and the default content are empty strings. In this way, it is possible to wrap the ui-view in a container element that will match the CSS :empty selector when there is no view loaded.