Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create multi-page applications with Meteor?

I am new to Javascript and just started fiddling around with Meteor out of curiosity. What really surprises me, is that it seems that all HTML content gets combined into a single page.

I suspect there is a way to introduce some handling of URLs directing to special pages. It seems that the "todo" example is capable of doing this via some kind of Router class. Is that the "canonical" way of URL handling?

Assuming I can handle URLs, how would I structure my HTML code to display separate pages? In my case they could each have completely separate sets of data, so no HTML code needs to be shared at all.

like image 880
Marcus Riemer Avatar asked Jul 31 '12 12:07

Marcus Riemer


People also ask

What is the difference between SPA and multi-page application?

What's the Difference Between Single-page Application and Multi-page Application. On demand, a single-page app reloads only the data necessary for the user. In the case of a multi-page app, the entire web page content is refreshed, which is also true about all the pages requested by the user.

What is multi-page application example?

Examples of Multi-page applications are eCommerce websites, blogs, forums, other sites that sell products and various services. eBay and Amazon are the best examples of MPAs. These websites transfer a lot of data from server to client and client to server, hence they are low on speed.

What is multi-page web application?

Multi-Page Applications As its name suggests, MPAs consist of more than one page. With MPAs, any data change or transfer to the server results in either a new page or a site reload. Typically it's dependent on Server Side Rendering techniques for better page loading times.


1 Answers

Jon Gold's answer used to be correct, but as of Meteor 0.5.4:

Work has now shifted to Iron Router. Please consider using IR instead of Router on new projects!

Thus, the current "canonical" way to do this is probably to use IronRouter.

like image 199
user456584 Avatar answered Oct 11 '22 15:10

user456584