Hey meteorites!
I’m having a difficult time importing client side javascript files with flow router. Without flow router, the imports work as expected but the second I introduce flow router the files aren’t loaded properly.
Here are what my files look like. Anybody out there ever experienced this ? You help is greatly appreciated
client/main.js
import '../imports/startup/client'; // initialize all relevant javascript
import './main.html';
client/main.html
<head>
<title>Welcome </title>
</head>
<template name="visitorLayout">
<body>
{{> Template.dynamic template=header }}
{{> Template.dynamic template=main }}
{{> Template.dynamic template=footer }}
</body>
</template>
<template name="adminLayout">
<body>
{{> Template.dynamic template=main }}
</body>
</template>
imports/startup/client/index.js
import '../../ui/pages/landing_page/modernizr-2.6.2.min.js';
import '../../ui/pages/landing_page/jquery.easing.1.3.js';
import '../../ui/pages/landing_page/bootstrap.min.js';
import '../../ui/pages/landing_page/jquery.waypoints.min.js';
import './routes';
imports/startup/client/routes.js
import { FlowRouter } from 'meteor/kadira:flow-router';
import { BlazeLayout } from 'meteor/kadira:blaze-layout';
FlowRouter.route('/', {
action() {
BlazeLayout.render('visitorLayout', {
header : "header",
footer : "footer",
main : "index"
})
}
});
FlowRouter.route('/admin', {
action() {
BlazeLayout.render('adminLayout', {
main : "admin"
})
}
});