More optimizations by reducing requests

This commit is contained in:
Anojh 2018-03-22 22:36:11 -07:00
parent 3a99f75daa
commit 1a352b2da0
2 changed files with 4 additions and 4 deletions

View file

@ -59,12 +59,12 @@ export class LandingPageComponent implements OnDestroy, OnInit {
this.images.getRandomBackground().subscribe(x => {
this.background = "";
});
}, 1000);
}, 10000);
setTimeout(() => {
this.images.getRandomBackground().subscribe(x => {
this.background = this.sanitizer
.bypassSecurityTrustStyle("linear-gradient(-10deg, transparent 20%, rgba(0,0,0,0.7) 20.0%, rgba(0,0,0,0.7) 80.0%, transparent 80%), url(" + x.url + ")");
});
}, 1000);
}, 10000);
}
}

View file

@ -120,13 +120,13 @@ export class LoginComponent implements OnDestroy, OnInit {
this.images.getRandomBackground().subscribe(x => {
this.background = "";
});
}, 1000);
}, 10000);
setTimeout(() => {
this.images.getRandomBackground().subscribe(x => {
this.background = this.sanitizer
.bypassSecurityTrustStyle("linear-gradient(-10deg, transparent 20%, rgba(0,0,0,0.7) 20.0%, rgba(0,0,0,0.7) 80.0%, transparent 80%), url(" + x.url + ")");
});
}, 1000);
}, 10000);
}
}