Skip to content

Commit

Permalink
No setTimeout for server rendering!
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkmalmgren committed Feb 13, 2018
1 parent d406a14 commit 075d6c9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bolingbrook-church",
"version": "1.3.10",
"version": "1.3.11",
"license": "MIT",
"angular-cli": {},
"scripts": {
Expand Down
10 changes: 7 additions & 3 deletions src/app/components/molecules/popup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { trigger, state, style, animate, transition } from '@angular/animations';
import { Aperture } from '../../services'

@Component({
selector: 'bc-popup',
Expand All @@ -15,10 +16,13 @@ import { trigger, state, style, animate, transition } from '@angular/animations'
})
export class PopupComponent implements OnInit {

popupState: string = 'hidden';
popupState: string = 'shown';

constructor(private aperture: Aperture) {}

ngOnInit() {
setTimeout(() => this.popupState = 'shown', 1000);
setTimeout(() => this.popupState = 'hidden', 10000);
if (this.aperture.browser) {
setTimeout(() => this.popupState = 'hidden', 10000);
}
}
}

0 comments on commit 075d6c9

Please sign in to comment.