O'Reilly logo

Mastering JavaScript Single Page Application Development by John Moore, Philip Klauzinski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Methods of presenting an SPA container

In a Single Page Application, the container is the object in which the application is initially loaded and displayed to the user. This concept is different from that of a software container, which is an isolated environment that an application lives in, much like a virtual machine.

For a single page web application, the container could be the <body> element, or any element within the <body> element. For instance, you may have some static welcome text initially loaded on the page in a <p> element, and the SPA will then load dynamically below that element in a <div> element:

<!doctype html> <html> <body> <p>This is some welcome text.</p> <div class="container"> The application will be loaded here. </div> </body> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required