title: Angular2 - wait for setup before routing
body: <p>I have an Angular2 client using RC4 and "@angular/router": "3.0.0-beta.2".  When the app first loads it makes a webApi call (to the same domain) to get some configuration data.  This is important - it contains the URL to the webApi (and other things).</p>
  
  <p>I need to not show the login or any page until this is complete.  I try hiding the content until this is finished like this:</p>
  
  <pre><code>&lt;div *ngIf="IsConfigReady"&gt;
     &lt;router-outlet&gt;&lt;/router-outlet&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>But I get routing errors if I hide the router outlet:</p>
  
  <blockquote>
    <p>Error: Cannot find primary outlet to load 'MyComponent'</p>
  </blockquote>
  
  <p>The user could be going to many components with a URL that directly targets them.  I can't put the ngif on all the individual components.</p>
  
  <p>I seems there should be a way to wait for setup to complete before routing begins. With CanActive I can stop routing, but then it will not continue once the app is ready.  </p>
  
  <p>Maybe I need to think about it a different way.
  Any ideas?</p>