browser deshability image and i went show text in the content of image if not exit image in angularjs

Hi I have a problem when my browser deshability the images. I have a content in my code that hold a html that the part of API send, and the html that I get of API content a div and a image. I need controller that if the image is null then can show text in the content.

<div ng-if="textBannerCtrl.banner.markUp">
                    <div id="cntImage" ng-bind-html="textBannerCtrl.banner.markUp | trustAsHtml"></div>
                <span ng-if="!textBannerCtrl.banner.markUp" class="alternate-image-text" aria-label="{{}}">{{}}</span>

Source: AngularJS