Single Page App

What's the easiest way to create a single page app with bs? Thanks for any help.

hmmmmn what is exactly a "single page app" ? I really have no idea what you mean...

google it, but essentially instead of multiple pages in a website, it's only 1 page that appears as several by showing/hiding ui modules.

I suppose I could build it as one page and write my own code to show/hide, but wanting to know if there is support for this already?

Not possible as would require a is framework like angular to get it to work but angular is not supported

So your saying you can only create a SPA with a framework like angular? I figured it could be done with some JavaScript files.

1 Like

I found this with a 30-second google search, did not have time to look into detail, but it sounds like it could work. SPA with no framework. My thinking is something that just uses jquery or similar that BST would support.

Glad you brought this up, JeffM. I'd always assumed that BS was for SPAs due to its origins in Twitter. Lately I am inclining towards SPA design myself since efficiency on small devices is vital to companies whose web viewers are using tablets and smartphones - if the site drags reloading, users lose patience. Balling all html pages into a one won't mean that much more kB in the file size either. A simple implementation might be similar to that for a CSS/JS slideshow, i.e. have all article page content on different z-indexes, show the one referenced by the navbar pointer and make transparent the others. Header (including logo, navbar, sign-in/login buttons) and footer content would be the same for all pages barring the navbar pointer and dead link on the current page.

Here's a simple SPA on CodePen

Note that the HTML class styles that would normally change on clicking another nav link do not change in the HTML frame in CodePen. Don't know why . . .

Hi, thanks for mentioning this. I found your comments very valuable.