Vulcan/packages/example-simple/lib/modules/routes.js
Brett 4af42540e3 Added comments from the example-simple video tutorial for reference for learners.
There are 12 steps that can be found in the project by searching #tutorial-step-1 and so on up to 12. The video is here: http://docs.vulcanjs.org/example-simple.html
2018-01-10 18:32:15 +09:00

11 lines
547 B
JavaScript

// modules/routes.js #tutorial-step-6 -
// Thi is the file that is called into package.js that allows the component to be found.
// First, we import this from vulcan core, which is a utility to add a new route.
import { addRoute, Components } from 'meteor/vulcan:core';
// Then, we add the component for what we want to add.
import '../components/movies/MoviesList.jsx';
// Next, we add the name 'movies', the path, which is the root, and the component name 'MovieList'.
addRoute({ name: 'movies', path: '/', componentName: 'MoviesList' });