2

I just played with ember routing example. It looks quite interesting. Especially if you are going to build all your application on Ember framework.

But parameters in url follows after '#'. That means you can't copy and send a link to someone if client has to login with postback (if only to set a cookie with login parameters). Is there a better option - maybe use '?' instead of '#'?

Willem de Wit
  • 8,604
  • 9
  • 57
  • 90
Saulius
  • 1,736
  • 20
  • 29

2 Answers2

5

You may also have a look at Ember.Router. There are two good start points @ https://gist.github.com/2679013 and https://gist.github.com/2728699

A lot of fixes have been made the last couple of days.

EDIT

A brand new guide is now available @ https://emberjs-staging-new.herokuapp.com/guides/outlets#toc_the-router

Mike Aski
  • 9,180
  • 4
  • 46
  • 63
  • could You recommend some tutorials or examples of managing states with controlers? – Saulius Jun 06 '12 at 07:23
  • Well, in fact, it is true that the given snippets are a little bit laconic. The official documentation does not yet covers this topic, but we are currently working with all these stuff with support from Tom Dale. Maybe I could help you with a full working example: I will write down an article ASAP & notify through this question. – Mike Aski Jun 06 '12 at 07:43
  • Yes, promising indeed. I just see there are different properties responsible for managing routes. In first example there is `setupContext` property, in second there is `setupControllers` and last has `connectOutlets`. It seems all they have very similar purpose. Should I stick to some or just have to wait till there are some more cleariness or else? And can't find out where `:post_id` parameter comes from when user clicks on certain post (last example)? – Saulius Jun 11 '12 at 07:08
  • I'll second Saulius's confusion about how all this works. A fully working canonical example would be very much appreciated. – Brian Jun 11 '12 at 17:01
2

Here is a full example courtesy of https://github.com/jbrown

http://jsfiddle.net/justinbrown/C7LrM/10/

Brian
  • 772
  • 1
  • 13
  • 31
  • Yes I saw last one either. And I believe that this must be considered as "canonical example" at the moment as there is latest ember and no additional routing libraries. And there is `connectOutlets` which is used in [ember site tutorial](https://emberjs-staging-new.herokuapp.com/guides/outlets#toc_the-router) It just a pity that it works with `#` which has shortcoming not being sent to server. – Saulius Jun 12 '12 at 05:13