MeteorExtensions Class
The main Meteor API methods.
Methods
Meteor.go
(
-
path
-
[state]
Navigate to the given path with an optional state object to pass along. This method proxies to the underlying pushState handler. We're currently using page-js.
Parameters:
-
path
StringThe path to navigate to. Example: "/posts/1234".
-
[state]
Object optionalAn optional state object.
Example:
Meteor.go(Meteor.postShowPath({_id: 1234}), { flash: "" });
Meteor.pages
(
PageRouter
-
pages
-
[options]
Convenience method to create a new PageRouter instance and call the pages method on it to create a bunch of pages at once.
Parameters:
-
pages
ObjectAn object of paths to page options.
-
[options]
Object optionalOptional options to pass to the PageRouter constructor
Returns:
PageRouter:
A new PageRouter instance.
Example:
Meteor.pages({
"/posts": "postIndex",
"/posts/:_id": {
to: "templateName",
layout: "layoutName",
nav: "nav key",
before: [ before callbacks ],
as: "path helpers name"
},
logout: function () {
}
}, {
// optional options to pass to PageRouter constructor.
autoRender: false
});