Skip to content
Permalink
Browse files

Step 7.7: Wait for user if logging in

  • Loading branch information...
dotansimha authored and darkbasic committed Jan 24, 2017
1 parent 9e0e844 commit 2e24939df882c0a7100d3885f55c30402b6e6c3a
Showing with 13 additions and 2 deletions.
  1. +13 −2 src/app/main.ts
@@ -1,7 +1,18 @@
import 'meteor-client';

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { MeteorObservable } from 'meteor-rxjs';
import { Meteor } from 'meteor/meteor';
import { AppModule } from './app.module';

platformBrowserDynamic().bootstrapModule(AppModule);
Meteor.startup(() => {
const subscription = MeteorObservable.autorun().subscribe(() => {

if (Meteor.loggingIn()) {
return;
}

setTimeout(() => subscription.unsubscribe());
platformBrowserDynamic().bootstrapModule(AppModule);
});
});

0 comments on commit 2e24939

Please sign in to comment.
You can’t perform that action at this time.