/
index.html
22 lines (22 loc) · 905 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<html>
<head>
<title>Service Workings?</title>
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('./sw.js')
.then(() => {
console.log
})
.catch(err => console.error('Looks like there is an error....', err))
}
</script>
<script src="./dist/app.min.js"></script>
</head>
<body ng-app='swApp'>
<h1>Service Worker + AngularJS</h1>
<p>To use this simple application, you don't really need to understand service workers, yet.</p>
<p>If your browser is online, it's working! It's saved some data to your localstorage.</p>
<p>Flip your browser or network offline and see what happens, it still runs with data from the cache!</p>
<datacomponent></datacomponent>
</body>
</html>