Integrating nexusui.js


#1

Bonjour !
I would like to add nice UI elements like rotary buttons from https://github.com/lsu-emdm/nexusUI in my ionic app.
I couldn’t find a way, I keep getting “error ‘nx’ is undefined”…
Thank you for any hints
Bruce


#2

As nx is defined in nexusUI.min.js or nexusUI.js, are you sure that did not make a mistake in the path to this script in your index.html? Don’t you see an error 404 in console? Did you write UI in uppercase?


#3

haha yes UI is uppercase!


#4

Do you get this error on a real device? It works for me in browser.


#5

at first I was testing on the device, now in the browser with ionic serve, so it’s easier to debug.
Since I renamed to nexusui.js, nx is now known, thank you.

Now, the nexusui controls don’t show up, would you be kind to share your code?
I’m starting javascript this summer, I’m more a c++ guy, so I am a beginner :wink:


#6

I did nothing special, I just put a canvas in ion-content

  <ion-content>
    <canvas nx="dial"></canvas>
  </ion-content>


#7

funny, I still don’t see the controls, but the container div is here in red: