Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

35 linhas
813 B

  1. import { Component, OnInit } from '@angular/core';
  2. import { Location } from '@angular/common';
  3. @Component({
  4. selector: 'app-welcome',
  5. templateUrl: './welcome.page.html',
  6. styleUrls: ['./welcome.page.scss'],
  7. })
  8. export class WelcomePage implements OnInit {
  9. user: any;
  10. constructor(
  11. private location: Location
  12. ) { }
  13. ngOnInit() {
  14. if (localStorage.getItem('FBUser')) {
  15. this.user = JSON.parse(localStorage.getItem('FBUser'));
  16. setTimeout(() => {
  17. this.location.back();
  18. setTimeout(() => {
  19. location.reload();
  20. }, 200);
  21. }, 3000);
  22. } else {
  23. this.user = null;
  24. this.location.back();
  25. }
  26. }
  27. }