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 5d45678 commit 72ff59cc8da877988b838ffb97f7142601b19814
Showing with 13 additions and 2 deletions.
  1. +13 −2 src/app/main.ts
View
@@ -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 72ff59c

Please sign in to comment.