Router / StateManager - can't make it work

2019-04-15 06:45发布

问题:

I've been trying to implement a router as specified in this guide, but I can't make it work. Can anyone give a quick code sample using the latest version of Ember to enable a router that supports routing through urls?

回答1:

Here is a one with ember latest, still prone to changes :)

http://jsfiddle.net/C7LrM/86/ posted by @mediastuttgart

The comments section of this Gist by wycats looks like the place where you can get updated fiddles :) https://gist.github.com/2728699#comments

This example uses:

handlebars-1.0.0.beta.6.js 

Ember latest as of now:
// Version: v0.9.8.1-484-g73ac0a4
// Last commit: 73ac0a4 (2012-07-06 11:52:32 -0700)

For documentation of present code under development please go to ember source where they have documentation alongside code,

Eg: https://github.com/emberjs/ember.js/blob/master/packages/ember-routing/lib/router.js

https://github.com/emberjs/ember.js/blob/master/packages/ember-routing/ in general