How to load different views according to entered rout in FlowRouter using angular-meteor in Meteor

31 Views Asked by At

I'm using FlowRouter for client side routing and I want to load different views and angular module according to the entered rout. For example:

FlowRouter.route('/u/:id', {
    name: 'Messages.show',
    action(params, queryParams) {
        check(params.id, String);
        hash = params.id;
        require('./u.html');
    }
});
FlowRouter.route('/m/:id', {
    name: 'Messages.show',
    action(params, queryParams) {
        check(params.id, String);
        hash = params.id;
        require('./m.html');
    }
});

I want to load completely different templates and files in for each route

0

There are 0 best solutions below