Procházet zdrojové kódy

Upload files to 'src'

tennesseegibbs před 6 roky
rodič
revize
eaf5e621e6
5 změnil soubory, kde provedl 138 přidání a 0 odebrání
  1. 40
    0
      src/app.module.ts
  2. 49
    0
      src/index.html
  3. 5
    0
      src/main.ts
  4. 13
    0
      src/manifest.json
  5. 31
    0
      src/service-worker.js

+ 40
- 0
src/app.module.ts Zobrazit soubor

@@ -0,0 +1,40 @@
1
+import { NgModule, ErrorHandler } from '@angular/core';
2
+import { BrowserModule } from '@angular/platform-browser';
3
+import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
4
+import { MyApp } from './app.component';
5
+
6
+import { AboutPage } from '../pages/about/about';
7
+import { ContactPage } from '../pages/contact/contact';
8
+import { HomePage } from '../pages/home/home';
9
+import { TabsPage } from '../pages/tabs/tabs';
10
+
11
+import { StatusBar } from '@ionic-native/status-bar';
12
+import { SplashScreen } from '@ionic-native/splash-screen';
13
+
14
+@NgModule({
15
+  declarations: [
16
+    MyApp,
17
+    AboutPage,
18
+    ContactPage,
19
+    HomePage,
20
+    TabsPage
21
+  ],
22
+  imports: [
23
+    BrowserModule,
24
+    IonicModule.forRoot(MyApp)
25
+  ],
26
+  bootstrap: [IonicApp],
27
+  entryComponents: [
28
+    MyApp,
29
+    AboutPage,
30
+    ContactPage,
31
+    HomePage,
32
+    TabsPage
33
+  ],
34
+  providers: [
35
+    StatusBar,
36
+    SplashScreen,
37
+    {provide: ErrorHandler, useClass: IonicErrorHandler}
38
+  ]
39
+})
40
+export class AppModule {}

+ 49
- 0
src/index.html Zobrazit soubor

@@ -0,0 +1,49 @@
1
+<!DOCTYPE html>
2
+<html lang="en" dir="ltr">
3
+<head>
4
+  <meta charset="UTF-8">
5
+  <title>Ionic App</title>
6
+  <meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
7
+  <meta name="format-detection" content="telephone=no">
8
+  <meta name="msapplication-tap-highlight" content="no">
9
+
10
+  <link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico">
11
+  <link rel="manifest" href="manifest.json">
12
+  <meta name="theme-color" content="#4e8ef7">
13
+
14
+  <!-- add to homescreen for ios -->
15
+  <meta name="apple-mobile-web-app-capable" content="yes">
16
+  <meta name="apple-mobile-web-app-status-bar-style" content="black">
17
+
18
+  <!-- cordova.js required for cordova apps (remove if not needed) -->
19
+  <script src="cordova.js"></script>
20
+
21
+  <!-- un-comment this code to enable service worker
22
+  <script>
23
+    if ('serviceWorker' in navigator) {
24
+      navigator.serviceWorker.register('service-worker.js')
25
+        .then(() => console.log('service worker installed'))
26
+        .catch(err => console.error('Error', err));
27
+    }
28
+  </script>-->
29
+
30
+  <link href="build/main.css" rel="stylesheet">
31
+
32
+</head>
33
+<body>
34
+
35
+  <!-- Ionic's root component and where the app will load -->
36
+  <ion-app></ion-app>
37
+
38
+  <!-- The polyfills js is generated during the build process -->
39
+  <script src="build/polyfills.js"></script>
40
+
41
+  <!-- The vendor js is generated during the build process
42
+       It contains all of the dependencies in node_modules -->
43
+  <script src="build/vendor.js"></script>
44
+
45
+  <!-- The main bundle js is generated during the build process -->
46
+  <script src="build/main.js"></script>
47
+
48
+</body>
49
+</html>

+ 5
- 0
src/main.ts Zobrazit soubor

@@ -0,0 +1,5 @@
1
+import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
2
+
3
+import { AppModule } from './app.module';
4
+
5
+platformBrowserDynamic().bootstrapModule(AppModule);

+ 13
- 0
src/manifest.json Zobrazit soubor

@@ -0,0 +1,13 @@
1
+{
2
+  "name": "Ionic",
3
+  "short_name": "Ionic",
4
+  "start_url": "index.html",
5
+  "display": "standalone",
6
+  "icons": [{
7
+    "src": "assets/imgs/logo.png",
8
+    "sizes": "512x512",
9
+    "type": "image/png"
10
+  }],
11
+  "background_color": "#4e8ef7",
12
+  "theme_color": "#4e8ef7"
13
+}

+ 31
- 0
src/service-worker.js Zobrazit soubor

@@ -0,0 +1,31 @@
1
+/**
2
+ * Check out https://googlechromelabs.github.io/sw-toolbox/ for
3
+ * more info on how to use sw-toolbox to custom configure your service worker.
4
+ */
5
+
6
+
7
+'use strict';
8
+importScripts('./build/sw-toolbox.js');
9
+
10
+self.toolbox.options.cache = {
11
+  name: 'ionic-cache'
12
+};
13
+
14
+// pre-cache our key assets
15
+self.toolbox.precache(
16
+  [
17
+    './build/main.js',
18
+    './build/vendor.js',
19
+    './build/main.css',
20
+    './build/polyfills.js',
21
+    'index.html',
22
+    'manifest.json'
23
+  ]
24
+);
25
+
26
+// dynamically cache any other local assets
27
+self.toolbox.router.any('/*', self.toolbox.fastest);
28
+
29
+// for any other requests go to the network, cache,
30
+// and then only use that cached resource if your user goes offline
31
+self.toolbox.router.default = self.toolbox.networkFirst;