Possible Duplicate:
Emberjs 1.0-pre router can’t find state for path and says router is undefined
Any advice on this will be helpful. I want the template named data-template-name="logging to display the outlet named {{outlet mine }} . For now using this jsfiddle, only the template named data-template-name="application can display this named outlet, and i have to manually call App.router.transitionTo('root.logon.index') from the console for that to happen. I will want the named outlet to be displayed automatically without manually calling transitionTo
<script type="text/x-handlebars" data-template-name="application">
<h1>Hi Friend</h1>
{{outlet}}
{{outlet mine }}
<br/>
<p><b>help</b></p>
{{view Ember.TextField placeholder="what" class="userInput" }}
<p> lets see</p>
{{outlet mine }}
App.Router = Ember.Router.extend({
enableLogging: true,
location: 'hash',
root: Ember.Route.extend({
showLogin: Ember.Route.transitionTo('root.logon'),
index: Ember.Route.extend({
route: '/',
connectOutlets: function(router){
router.get('applicationController').connectOutlet('login');
}
}),
logon: Ember.Route.extend({
route: '/login',
enter: function ( router ){
console.log("The login sub-state was entered.");
},
connectOutlets: function(router, context){
router.get('applicationController').connectOutlet( 'login');
},
index: Ember.Route.extend({
route: '/',
connectOutlets: function(router) {
router.get('loginController').connectOutlet('mine', 'login');
}
})
})
})
});