tarabyte
tarabyte

Reputation: 19202

How to structure a multi-page chrome app?

I'm building a file for each 'page' I want to dynamically load. Each 'page' file is implemented using the Singleton Pattern, with pretty much just one public method, loadPage() or init().

Is there a better way to approach this? A framework that I should know of? It's not a complicated app, maybe 3-5pages. It just started to become a real pain document.createElement-ing several nested div's with JavaScript.

Upvotes: 0

Views: 56

Answers (1)

Marc Rochkind
Marc Rochkind

Reputation: 3740

Replace the contents of the body with an assignment to innerHtml and take that HTML from a file inside the app folder.

Upvotes: 1

Related Questions