In my home page i have an oulet watchListView i just want to replace the outlet with the view i am getting after clicking the link "/watch_lists".
This is the code for application Layout/template
<div id='main-outlet'>
{{outlet}}
<div class="watch-list-rght"><a href="/watch_lists"><i class="icon-eye-open"></i></a> </div>
</div>
{{outlet watchListView}}
This is the code in application route
this.resource('watchList', { path: '/watch_lists' });
This is the code in WatchList router
Discourse.WatchListRoute = Discourse.Route.extend({
redirect: function() { Discourse.redirectIfLoginRequired(this); },
renderTemplate: function() {
this.render('watch_lists', { into: 'application', outlet: 'watchListView' });
}
});
I Just want to add view created after the ajax call in the application template
Can anyone point me out where i am wrong.