How to get rid of Iron Router splash page
Asked Answered
S

2

8

I have a Meteor app and I'm using the iron:router package. Both when I deploy to meteor.com and when I'm developing locally, an iron router splash page shows up on the page with the line "Organize your meteor application". How can I get rid of this? I've tried a number of things but nothing seems to have helped.

Thanks

Silverts answered 17/4, 2015 at 6:54 Comment(4)
You need to add a route. Follow the instructions on the splash screen or remove iron router using meteor remove iron:routerKleist
I've made a route on the server in a js file. Is it possible that iron router isn't picking up where it is?Silverts
You need a route on the client too. Iron router is trying to find something to route for /. It can't find anything so it displays this notice.Kleist
I think that was the problem. I added a route to a global js file and it no longer shows up.Silverts
S
2

Iron Router runs on both the client and the server, so make sure the route is defined in both places, i.e. some not under /client or /server folders. See docs.

Swoosh answered 12/7, 2015 at 5:5 Comment(0)
S
1

There is an option which allows you to provide your own "not found" template:

Router.configure({
    notFoundTemplate: "notFound"
});

The default not found template is called __IronRouterNoRoutes__ See

Sagacity answered 18/12, 2015 at 21:38 Comment(1)
And I created a html file with a template named notFound with no contentsAxon

© 2022 - 2024 — McMap. All rights reserved.