Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d3a177b7c | ||
|
|
07b84586b6 | ||
|
|
5267eb6ab1 | ||
|
|
5daa64d962 | ||
|
|
b939f4d4f3 |
@@ -30,7 +30,8 @@
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "public"
|
||||
}
|
||||
},
|
||||
"src/sw.js"
|
||||
],
|
||||
"styles": [
|
||||
"node_modules/bootstrap/dist/css/bootstrap.min.css",
|
||||
|
||||
1875
package-lock.json
generated
1875
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -47,7 +47,7 @@ export class AppComponent implements OnInit {
|
||||
var playersPerTeam = Math.floor(names.length / this.numTeamsSelected);
|
||||
|
||||
let nameslen = names.length;
|
||||
function* iter(list: any){
|
||||
function* iter(list: any[]){
|
||||
let index = 0;
|
||||
while(true){
|
||||
yield list[index % list.length];
|
||||
|
||||
@@ -7,7 +7,7 @@ import { provideAnimationsAsync } from '@angular/platform-browser/animations/asy
|
||||
import { provideServiceWorker } from '@angular/service-worker';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes), provideClientHydration(withEventReplay()), provideAnimationsAsync('noop'), provideServiceWorker('ngsw-worker.js', {
|
||||
providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes), provideClientHydration(withEventReplay()), provideAnimationsAsync('noop'), provideServiceWorker('./sw.js', {
|
||||
enabled: !isDevMode(),
|
||||
registrationStrategy: 'registerWhenStable:30000'
|
||||
})]
|
||||
|
||||
12
src/sw.js
Normal file
12
src/sw.js
Normal file
@@ -0,0 +1,12 @@
|
||||
self.addEventListener('fetch', event => {
|
||||
if (event &&
|
||||
event.request &&
|
||||
event.request.url &&
|
||||
// check if basename includes a dot, i.e. if it is not a file
|
||||
! event.request.url.split(/[\\/]/).pop().includes(".")
|
||||
) {
|
||||
event.stopImmediatePropagation();
|
||||
}
|
||||
});
|
||||
|
||||
self.importScripts('./ngsw-worker.js');
|
||||
Reference in New Issue
Block a user