I'm getting room images from a 3rd party API as json.
If the room contains images it creates a room image object inside my hotel object, otherwise it does not create the room image object.
I just want to display the first image if it is multiple - Else display an "No image available" image.
Would I be better in Angular to do the if statement before it gets to the view or do a conditional inline in the view? Or use a filter?
I know in php you can use isset. Does angular have something similar?
<img class="img-responsive" ng-src="{{room.RoomImages.RoomImage[0].url}}" />
{{(room.RoomImages.RoomImage|| [] ).length ? room.RoomImages.RoomImage[0].url : 'your img here'}}