Skip to content
Guillaume Gendre edited this page May 27, 2015 · 43 revisions

Cobalt offers a navigation system based on native transitions. This allows fast and furious performances for your web apps :)

It allows the web side to push any web page and to choose in which native controller the page will be shown. A default fullscreen controller is ready with Cobalt but you can create your own, and start to mix web and native components on the same view.

Using navigation on the web side

All navigation commands are in the cobalt.navigate scope :

cobalt.conf

All of theses commands rely on the existance of a cobalt.conf file in the www folder, wich tells what native controller correspond to the named pages.

See the cobalt.conf

Under the hood

These are the messages sent to the native side for each navigation type:

{ "type":"navigation", "action":"push", data : { page :"index.html", controller: "myController" }
{ "type":"navigation", "action":"pop" }
{ "type":"navigation", "action":"modal", data : { page :"index.html", controller: "myController" }
{ "type":"navigation", "action":"dismiss" }
Clone this wiki locally