I have a Meteor application and I'm using a combination of angular-meteor and Iron Router routing.
Angular-meteor client side routing is used for all browser side routing and Iron Router is used for all server side routing. I'm implementing an OAuth2 server in Meteor so I need to be able to hit a URL without using the client side code.
The setup works great, but with one consequence: the Iron Router 'not found' template always shows on the client, because I have no client side routes for Iron Router:
I've also tried adding a blank Iron Router route to the client side code:
Router.route('(.*)', function(){
//Do nothing
});
or
Router.route('(.*)', function(){
//Do nothing
this.ready();
});
But that results in all my angular-meteor templates being duplicated on the client:
I've also tried setting the Iron Router configuration to use a different not-found template I've written in Blaze, and using angular-with-blaze:
> meteor add angular-with-blaze
client & server code:
Router.configure({
notFoundTemplate: "ironrouternotfound"
});
ironrouternotfound_blaze.html:
<template name="ironrouternotfound">
IR Not Found
</template>
ironrouternotfound.html
<blaze-template name="ironrouternotfound"></blaze-template>
But that results in the following text being injected into the bottom on the HTML DOM:
Couldn't find a template named "ironrouternotfound" or "ironrouternotfound". Are you sure you defined it?
This message is injected by IronRouter and it doesn't have an ID on the div or any CSS classes so I can't hide it using JS or CSS. (Well, I might be able to hack a JS to remove the last div on the page, but that could be dangerous)
Any one managed to remove the Iron Router not-found view in this situation?