خرید بک لینک

Vote count: 0

I thought I had iron router nailed but for some reason I'm ruing into issues with it not displaying additional views beyond the root default template - and it used to work fine.

Basically I have a default layout template for the main view. Then I have a dynamic route that essentially displays different user lists.

you can see this here:

placelist.meteorapp.com - main

placelist.meteorapp.com/cmeelater - dynamic user lists

The main view is totally fine (has a logged in and logged out state) but the template for the sub routes (/) isn't displaying - instead it's displaying the default template.

It was working before but now I'm a slightly lost. Any help would be super appreciated. (I've poked around for info).

Additonal info:

What's happening below in my route.js is a session variable gets passed to a query from the URL parameter. This then pulls the lists for that users based on the URL param and should use "userListsShared" template to display this (btw this works if I just blindly insert {{> userListsShared}} into the main template but I don't want that).

I thought if you declared the template to use in the route it would use that template - is there some inheritance thing going on?

Router.configure({
    layoutTemplate: 'userListsShared',
    loadingTemplate: 'loading',
    waitOn: function() { 
      retu Meteor.subscribe('posts'); 
      retu Meteor.subscribe('userposts');
    }
});

Router.map(function() {
    this.route('main', {
              path: '/',
              template: 'main'
            }
      );
    this.route('shared', {
      path: '/:sharelink',
      template:'userListsShared',
      data: function () 
              {
                   Session.set('curShareList', this.params.sharelink);
              }

});

asked 17 secs ago

- - , .
.

برچسب: نویسنده: استخدام کار تاريخ: سه شنبه 22 تير 1395 ساعت: 6:57

صفحه بندی