title: Angular Conditional Routing
body: <p>I am working on a somewhat simple chat app to familiarize myself with node/angular, but am typically a PHP developer. What I'm trying to do right now is make it so that if someone were to go to a room that does not exist, they would receive a page with a simple "Room does not exist" error message. But if it does exist, they would be able to join the room.</p>
  
  <p>Right now, what I've been doing is using an <code>ngIf</code> in the view to display the error message if the server responds that it doesn't exist and to display the chat if it does exist. </p>
  
  <p>I just don't quite care for how that works. Maybe it's just because of my normal background, but it feels weird to use the same view for multiple purposes based purely on what data returns.It seems very much like a less than elegant solution.</p>
  
  <p>I'm using this as a one page app with ngRoute. Is there a way through Routes or some other method that I could do a check for the room before the route fires and redirect based on that?</p>