Zendesk - How to include custom js file in client side app?



Data ultimo post: 07 lug 2022

I am trying create Clint side in Zendesk framework. I want to include custom js file to perform some action (to keep it separate).

Directory structure

app-folder
    assets
        iframe.html
        .
        .
    sevices
        userServices.js
    tmp
    translations
        en.json
    manifest.json

I have included file like following (in iframe.html)

<script src="/base-app/services/userServices.js"></script>

i am getting following error

GET http://localhost:4567/base-app/services/userServices.js net::ERR_ABORTED 404 (Not Found)


0

1

1 commento

Hey Ram,

You'll need to put the services sub-directory in the "assets" directory. We talk about it here, once moved your script will look like 
 
<script src="./services/userServices.js"></script>
 
Hope this helps!

1


Accedi per lasciare un commento.

Non hai trovato quello che cerchi?

Nuovo post