0

Single Page Application

Tried creating a Single page application. The script files are all imported in index.html. They work fine as long as the codes are for the elements in index.html file. The subfolder created has a table when I tried to access that id from subfolder.js it doesn't work. I tried importing the JavaScript file in both index.html and subfolder.html, But it doesn't seem to work.

File structure:

  • JavaScript
    • app.js
    • route.js
    • router.js
    • subfolder.js
  • Views
    • subfolder.html
  • index.html

Where should I import the script file to get and change the element in subfolder.html using its id tag.

dippas
  • 58,591
  • 15
  • 114
  • 126
Mithun raj
  • 204
  • 3
  • 11

0 Answers0