2

I have this working example fiddle of ember routing http://jsfiddle.net/C7LrM/102/

I want to change the ApplicationController to ApplicationzController lije this http://jsfiddle.net/C7LrM/102/

and call

router.get('applicationzController').connectOutlet('profile');

but it doesnt work, is ApplicationController just a name or something more? What am i doing wrong.

I am working on a single componenet of a bigger application, so i love to keep my componentController at the top of my stack, and use the routes/states internally for my component.

sly7_7
  • 11,961
  • 3
  • 40
  • 54
sabithpocker
  • 15,274
  • 1
  • 42
  • 75

1 Answers1

4

As of today, the root controller is expected to be applicationController (hard-coded into ember source...). So you are not free about naming it.

Mike Aski
  • 9,180
  • 4
  • 46
  • 63
  • 2
    +1, see: http://stackoverflow.com/questions/11192668/how-can-i-set-the-applicationcontroller-in-ember-router – sly7_7 Jul 09 '12 at 07:39
  • @MikeAski Thank you for the response, so what do you think is the best way for developing a component in isolation? Keep a dummy AplicationController at top? – sabithpocker Jul 09 '12 at 07:59
  • Yep. Isolation is not guarantied by you're root controller's name, but rather by your namespace. So if you want to isolate multiple components, you can use several application namespaces (You just have to avoid nesting them in the DOM). – Mike Aski Jul 09 '12 at 08:01
  • @MikeAski I am getting some idea but didnt understand you completely, Can I put up a seperate question on approach towards creating components in isolation using ember? will you be interested in helping with an answer? – sabithpocker Jul 09 '12 at 08:04
  • @MikeAski http://stackoverflow.com/questions/11391333/emberjs-develop-a-component-in-isolation-with-its-own-routing-states-which-can here is the concern, please take a look – sabithpocker Jul 09 '12 at 08:21