Example: The picture-gallery-directive retrieves pictures and passes them to the scope:
var galleryBootstrapData = bootstrapDataService.get('galleryBootstrapData');
$scope.galleryPictures = galleryBootstrapData.pictures;
The picture-gallery-template renders the pictures and as shown below the number of pictures:
<div ng-if="galleryPictures.length && galleryPictures.length>0" >{{galleryPictures.length}}</div>
Is it good practice to check the scope-variables for undefined from within the template?