How to visualize svg inside ionic content

My application is built using Angularjs and ionic, using a cord for a hybrid mobile application, when I try to display the svg content received from the backend, the application cannot display the expected diagram.

This is what my code looks like

<ion-tab title="Diagram" icon-on="mcfly">           
        <ion-view>
            <ion-content class="padding" ng-class="{'has-loading': header.isLoading}">
                <h4>System Diagram</h4>                 
                    {{diagram}}
        </ion-content>
    </ion-view>
</ion-tab>

But what I see is svg data instead of image, is there any missing ad or thing?

thanks

+4
source share
1 answer

You need to put it in the image tag, for example:

<img class="title-image" src="path to your diagram" width="xxx" height="xxx" />

please check this plunker showing svg

+5
source

Source: https://habr.com/ru/post/1614401/


All Articles