Problems with javascript code from controller on iOS

Guys, this is the situation:
I have a javascript code that generates a crossword grid and it runs fine from within a HTML file in a pure cordova project.
However, if I put this same code in a Ionic project inside the controller, problems begin on iOS.
First of all, the grid becomes unclickable (I can no longer select a cell to type in a letter) and, visually, the borders simply disappear.
I believe a HTML file with javascript in it is the solution but how can I use this with Ionic? Can I do this without using any controller?
Any other possible solution?
See images for comparison. The codes are also on github.

I found out contenteditable is not working in table creation with ionic.
Any fix?

If problem in contenteditable then please add contenteditable=“true” to relevant div.

Like:

   <div class="item" contenteditable="true">Hello</div>

For table creation in ionic please use grid ( I suggest ):

No. That’s the problem. It’s already true but ionic won’t let me focus it. It seems to be some kind of bug