Skip to content

Instantly share code, notes, and snippets.

@romanejaquez
Created August 18, 2020 04:18
Show Gist options
  • Save romanejaquez/c383b9b0666f5129870f757b265eb512 to your computer and use it in GitHub Desktop.
Save romanejaquez/c383b9b0666f5129870f757b265eb512 to your computer and use it in GitHub Desktop.
import { Component, OnInit } from "@angular/core";
@Component({
selector: "splash-screen",
templateUrl: "./splash-screen.component.html",
styleUrls: ["./splash-screen.component.css"]
})
export class SplashScreenComponent implements OnInit {
windowWidth: string;
showSplash = true;
ngOnInit(): void {
setTimeout(() => {
this.windowWidth = "-" + window.innerWidth + "px";
setTimeout(() => {
this.showSplash = !this.showSplash;
}, 500);
}, 3000);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment