-4

I build application on IONIC V1 and make some background service. In service I try call some file from javascript. I have folder structure like this

Is it possible to call file.js at class.java ? And How to call file.js at class.java ? If you have some idea please tell me. Thanks.

Nugka
  • 301
  • 2
  • 15

1 Answers1

1

Yes Obviously you can! One method is by including the path via AJAX call

$.get("www/js/file.js", function (response) {

                                                         }, "json");

Please do check this:

how to call a java class method in javascript using ajax ?

V5NEXT
  • 1,907
  • 4
  • 19
  • 38