-
Notifications
You must be signed in to change notification settings - Fork 14
Navigation
Guillaume Gendre edited this page Apr 29, 2019
·
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 content of your app to push any new web page and to choose in which native controller the page will be shown. A default fullscreen controller is packed with Cobalt but you can create your own, and start to mix web and native components on the same view.
All navigation commands are in the cobalt.navigate scope :
- cobalt.navigate.push, to push a new page
- cobalt.navigate.pop, to pop the current page
- cobalt.navigate.popTo, to pop to a specified previous page
- cobalt.navigate.modal and cobalt.navigate.dismiss, for an alternative navigation
- cobalt.navigate.replace, to replace the current page with another
All of theses commands rely on the existence of a cobalt.json file in the www folder, wich tells what native controller correspond to the named pages.
See cobalt.json documentation
Cobalt is an Open-Source Hybrid Mobile Framework. Read more about it on the home page or in the documentation
- Introduction to Cobalt navigation
- The cobalt.json file
- native navigation bars
- Handling the Android back button
- Introduction to Cobalt messages
- Publish/Subscribe on the Web side
- Publish/Subscribe on Android
- Publish/Subscribe on iOS
- Web Lifecycle messages
- Pull-To-Refresh and Infinite Scroll
- Custom alerts and Toasts
- LocalStorage
- OpenExternalUrl
- PlatformInfos
- Ajax
- Removing the top bar
- Adding Cobalt to an existing project
- Customizing your hybrid views
- Handle multiple Cobalt webviews on the same screen (TODO)