Go and see live demo at backbone-routing-demo.meteor.com.
You need meteorite
to use Atmosphere Smart Packages.
npm install -g meteorite
or
sudo -H npm install -g meteorite
Meteor & Atmosphere packages management
meteor add jquery
meteor add account-ui
meteor add accounts-password
meteor add backbone
mrt add bootstrap-3
meteor remove insecure
meteor remove autopublish
###Application structure
model.js
smart.json
public/
client/
client.js
index.html
styles.css
server/
server.js
###Run application
meteor
When there is selectedUser
in url bar address is set into /userName
.
For example: backbone-routing-demo.meteor.com/mmotel@test
.
When tehre is selectedCategory
in url bar address is set into /userName/category_id
.
For example: backbone-routing-demo.meteor.com/mmotel@test/txjYRcKAQrwMbenbZ
.
Routing is bidirectional what we can see when we click on links above.