How can I insert this code into ionic

I try to develop an app which can visualize an image in 360 degrees and I am making use of this code, I understand that you can show jQuery code in typescript … It would help me a lot to explain a solution to this problem thanks.

<script type="text/javascript" src="demo/jquery-1_0.js"></script>
<script type="text/javascript" src="demo/jquery-webglpanorama.min.js"></script>

<script type="text/javascript">
$(document).ready(function(){

    var data = {
       xp : "assets/xp.png",
        xn : "assets/xn.png",
        yp : "assets/yp.png",
        yn : "assets/yn.png",
        zp : "assets/zp.png",
        zn : "assets/zn.png"
   }
	$('#view').panorama(data);

});
</script>

<canvas id="view" width="640" height="400"></canvas>

Depends on which Ionic version you’re using.
Ionic V1 you can throw it in your www/index.html or whichever page you need it in.
However, with Ionic 2-3 (whichever has .ts); you’d have to go to your pages then in
like home/home/ then add it in the home.html page.

I haven’t used Ionic v2-3+ much; but that should be the solution.

After compilation the script will stay. :slight_smile:

Regards,
Neonic1

1 Like

Yes. I am using Ionic v1
Thanks.

Same as me, no problem.
If this solved your issue, mind clicking “Solution” on my previous comment? :slight_smile:

Regards,
Neonic1

Hahah thanks i’ll try right now :smiley:

1 Like