Преглед на файлове

Recreate ionic-beer app with the latest Ionic release

Matt Raible преди 7 години
родител
ревизия
4970fb7c3f
променени са 65 файла, в които са добавени 211 реда и са изтрити 3474 реда
  1. 26
    0
      ionic-beer/README.md
  2. 87
    40
      ionic-beer/config.xml
  3. 60
    51
      ionic-beer/package.json
  4. BIN
      ionic-beer/resources/android/icon/drawable-hdpi-icon.png
  5. BIN
      ionic-beer/resources/android/icon/drawable-ldpi-icon.png
  6. BIN
      ionic-beer/resources/android/icon/drawable-mdpi-icon.png
  7. BIN
      ionic-beer/resources/android/icon/drawable-xhdpi-icon.png
  8. BIN
      ionic-beer/resources/android/icon/drawable-xxhdpi-icon.png
  9. BIN
      ionic-beer/resources/android/icon/drawable-xxxhdpi-icon.png
  10. BIN
      ionic-beer/resources/android/splash/drawable-land-hdpi-screen.png
  11. BIN
      ionic-beer/resources/android/splash/drawable-land-ldpi-screen.png
  12. BIN
      ionic-beer/resources/android/splash/drawable-land-mdpi-screen.png
  13. BIN
      ionic-beer/resources/android/splash/drawable-land-xhdpi-screen.png
  14. BIN
      ionic-beer/resources/android/splash/drawable-land-xxhdpi-screen.png
  15. BIN
      ionic-beer/resources/android/splash/drawable-land-xxxhdpi-screen.png
  16. BIN
      ionic-beer/resources/android/splash/drawable-port-hdpi-screen.png
  17. BIN
      ionic-beer/resources/android/splash/drawable-port-ldpi-screen.png
  18. BIN
      ionic-beer/resources/android/splash/drawable-port-mdpi-screen.png
  19. BIN
      ionic-beer/resources/android/splash/drawable-port-xhdpi-screen.png
  20. BIN
      ionic-beer/resources/android/splash/drawable-port-xxhdpi-screen.png
  21. BIN
      ionic-beer/resources/android/splash/drawable-port-xxxhdpi-screen.png
  22. BIN
      ionic-beer/resources/ios/icon/icon-40.png
  23. BIN
      ionic-beer/resources/ios/icon/icon-40@2x.png
  24. BIN
      ionic-beer/resources/ios/icon/icon-40@3x.png
  25. BIN
      ionic-beer/resources/ios/icon/icon-50.png
  26. BIN
      ionic-beer/resources/ios/icon/icon-50@2x.png
  27. BIN
      ionic-beer/resources/ios/icon/icon-60.png
  28. BIN
      ionic-beer/resources/ios/icon/icon-60@2x.png
  29. BIN
      ionic-beer/resources/ios/icon/icon-60@3x.png
  30. BIN
      ionic-beer/resources/ios/icon/icon-72.png
  31. BIN
      ionic-beer/resources/ios/icon/icon-72@2x.png
  32. BIN
      ionic-beer/resources/ios/icon/icon-76.png
  33. BIN
      ionic-beer/resources/ios/icon/icon-76@2x.png
  34. BIN
      ionic-beer/resources/ios/icon/icon-83.5@2x.png
  35. BIN
      ionic-beer/resources/ios/icon/icon-small.png
  36. BIN
      ionic-beer/resources/ios/icon/icon-small@2x.png
  37. BIN
      ionic-beer/resources/ios/icon/icon-small@3x.png
  38. BIN
      ionic-beer/resources/ios/icon/icon.png
  39. BIN
      ionic-beer/resources/ios/icon/icon@2x.png
  40. BIN
      ionic-beer/resources/ios/splash/Default-568h@2x~iphone.png
  41. BIN
      ionic-beer/resources/ios/splash/Default-667h.png
  42. BIN
      ionic-beer/resources/ios/splash/Default-736h.png
  43. BIN
      ionic-beer/resources/ios/splash/Default-Landscape-736h.png
  44. BIN
      ionic-beer/resources/ios/splash/Default-Landscape@2x~ipad.png
  45. BIN
      ionic-beer/resources/ios/splash/Default-Landscape@~ipadpro.png
  46. BIN
      ionic-beer/resources/ios/splash/Default-Landscape~ipad.png
  47. BIN
      ionic-beer/resources/ios/splash/Default-Portrait@2x~ipad.png
  48. BIN
      ionic-beer/resources/ios/splash/Default-Portrait@~ipadpro.png
  49. BIN
      ionic-beer/resources/ios/splash/Default-Portrait~ipad.png
  50. BIN
      ionic-beer/resources/ios/splash/Default@2x~iphone.png
  51. BIN
      ionic-beer/resources/ios/splash/Default~iphone.png
  52. BIN
      ionic-beer/resources/splash.png
  53. 3
    5
      ionic-beer/src/app/app.module.ts
  54. 1
    1
      ionic-beer/src/index.html
  55. 3
    3
      ionic-beer/src/manifest.json
  56. 1
    1
      ionic-beer/src/pages/beer/beer-modal.ts
  57. 0
    1
      ionic-beer/src/pages/beer/beer.html
  58. 8
    6
      ionic-beer/src/pages/beer/beer.module.ts
  59. 6
    6
      ionic-beer/src/pages/beer/beer.ts
  60. 2
    2
      ionic-beer/src/pages/tabs/tabs.html
  61. 8
    5
      ionic-beer/src/pages/tabs/tabs.ts
  62. 2
    1
      ionic-beer/src/providers/beer-service.ts
  63. 2
    3
      ionic-beer/src/providers/giphy-service.ts
  64. 2
    2
      ionic-beer/src/service-worker.js
  65. 0
    3347
      ionic-beer/yarn.lock

+ 26
- 0
ionic-beer/README.md Целия файл

@@ -0,0 +1,26 @@
1
+This is a starter template for [Ionic](http://ionicframework.com/docs/) projects.
2
+
3
+## How to use this template
4
+
5
+*This template does not work on its own*. The shared files for each starter are found in the [ionic2-app-base repo](https://github.com/driftyco/ionic2-app-base).
6
+
7
+To use this template, either create a new ionic project using the ionic node.js utility, or copy the files from this repository into the [Starter App Base](https://github.com/driftyco/ionic2-app-base).
8
+
9
+### With the Ionic CLI:
10
+
11
+Take the name after `ionic2-starter-`, and that is the name of the template to be used when using the `ionic start` command below:
12
+
13
+```bash
14
+$ sudo npm install -g ionic cordova
15
+$ ionic start myTabs tabs
16
+```
17
+
18
+Then, to run it, cd into `myTabs` and run:
19
+
20
+```bash
21
+$ ionic cordova platform add ios
22
+$ ionic cordova run ios
23
+```
24
+
25
+Substitute ios for android if not on a Mac.
26
+

+ 87
- 40
ionic-beer/config.xml Целия файл

@@ -1,41 +1,88 @@
1
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
-<widget id="com.ionicframework.ionicbeer926596" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
3
-  <name>ionic-beer</name>
4
-  <description>An awesome Ionic/Cordova app.</description>
5
-  <author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
6
-  <content src="index.html"/>
7
-  <access origin="*"/>
8
-  <allow-navigation href="http://ionic.local/*"/>
9
-  <allow-intent href="http://*/*"/>
10
-  <allow-intent href="https://*/*"/>
11
-  <allow-intent href="tel:*"/>
12
-  <allow-intent href="sms:*"/>
13
-  <allow-intent href="mailto:*"/>
14
-  <allow-intent href="geo:*"/>
15
-  <platform name="android">
16
-    <allow-intent href="market:*"/>
17
-  </platform>
18
-  <platform name="ios">
19
-    <allow-intent href="itms:*"/>
20
-    <allow-intent href="itms-apps:*"/>
21
-  </platform>
22
-  <preference name="webviewbounce" value="false"/>
23
-  <preference name="UIWebViewBounce" value="false"/>
24
-  <preference name="DisallowOverscroll" value="true"/>
25
-  <preference name="android-minSdkVersion" value="16"/>
26
-  <preference name="BackupWebStorage" value="none"/>
27
-  <preference name="SplashMaintainAspectRatio" value="true"/>
28
-  <preference name="FadeSplashScreenDuration" value="300"/>
29
-  <preference name="SplashShowOnlyFirstTime" value="false"/>
30
-  <preference name="loadUrlTimeoutValue" value="60000"/>
31
-  <feature name="StatusBar">
32
-    <param name="ios-package" onload="true" value="CDVStatusBar"/>
33
-  </feature>
34
-  <plugin name="ionic-plugin-keyboard" spec="~2.2.1"/>
35
-  <plugin name="cordova-plugin-whitelist" spec="1.3.1"/>
36
-  <plugin name="cordova-plugin-console" spec="1.0.5"/>
37
-  <plugin name="cordova-plugin-statusbar" spec="2.2.1"/>
38
-  <plugin name="cordova-plugin-device" spec="1.1.4"/>
39
-  <plugin name="cordova-plugin-splashscreen" spec="~4.0.1"/>
40
-
1
+<?xml version='1.0' encoding='utf-8'?>
2
+<widget id="io.ionic.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
3
+    <name>MyApp</name>
4
+    <description>An awesome Ionic/Cordova app.</description>
5
+    <author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
6
+    <content src="index.html" />
7
+    <access origin="*" />
8
+    <allow-navigation href="http://ionic.local/*" />
9
+    <allow-intent href="http://*/*" />
10
+    <allow-intent href="https://*/*" />
11
+    <allow-intent href="tel:*" />
12
+    <allow-intent href="sms:*" />
13
+    <allow-intent href="mailto:*" />
14
+    <allow-intent href="geo:*" />
15
+    <preference name="webviewbounce" value="false" />
16
+    <preference name="UIWebViewBounce" value="false" />
17
+    <preference name="DisallowOverscroll" value="true" />
18
+    <preference name="android-minSdkVersion" value="16" />
19
+    <preference name="BackupWebStorage" value="none" />
20
+    <preference name="SplashMaintainAspectRatio" value="true" />
21
+    <preference name="FadeSplashScreenDuration" value="300" />
22
+    <preference name="SplashShowOnlyFirstTime" value="false" />
23
+    <preference name="SplashScreen" value="screen" />
24
+    <preference name="SplashScreenDelay" value="3000" />
25
+    <platform name="android">
26
+        <allow-intent href="market:*" />
27
+        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
28
+        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
29
+        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
30
+        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
31
+        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
32
+        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
33
+        <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
34
+        <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
35
+        <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
36
+        <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
37
+        <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
38
+        <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
39
+        <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
40
+        <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
41
+        <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
42
+        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
43
+        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
44
+        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
45
+    </platform>
46
+    <platform name="ios">
47
+        <allow-intent href="itms:*" />
48
+        <allow-intent href="itms-apps:*" />
49
+        <icon height="57" src="resources/ios/icon/icon.png" width="57" />
50
+        <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
51
+        <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
52
+        <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
53
+        <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
54
+        <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
55
+        <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
56
+        <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
57
+        <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
58
+        <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
59
+        <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
60
+        <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
61
+        <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
62
+        <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
63
+        <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
64
+        <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
65
+        <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
66
+        <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
67
+        <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
68
+        <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
69
+        <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
70
+        <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
71
+        <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
72
+        <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
73
+        <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
74
+        <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
75
+        <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
76
+        <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
77
+        <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
78
+        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
79
+    </platform>
80
+    <engine name="android" spec="^6.2.3" />
81
+    <engine name="ios" spec="^4.4.0" />
82
+    <plugin name="cordova-plugin-console" spec="^1.0.5" />
83
+    <plugin name="cordova-plugin-device" spec="^1.1.4" />
84
+    <plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
85
+    <plugin name="cordova-plugin-statusbar" spec="^2.2.2" />
86
+    <plugin name="cordova-plugin-whitelist" spec="^1.3.1" />
87
+    <plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
41 88
 </widget>

+ 60
- 51
ionic-beer/package.json Целия файл

@@ -1,53 +1,62 @@
1 1
 {
2
-  "name": "ionic-beer",
3
-  "author": "Matt Raible",
4
-  "homepage": "https://github.com/oktadeveloper/spring-boot-ionic-example",
5
-  "private": true,
6
-  "scripts": {
7
-    "clean": "ionic-app-scripts clean",
8
-    "build": "ionic-app-scripts build",
9
-    "ionic:build": "ionic-app-scripts build",
10
-    "ionic:serve": "ionic-app-scripts serve"
11
-  },
12
-  "dependencies": {
13
-    "@angular/common": "4.0.2",
14
-    "@angular/compiler": "4.0.2",
15
-    "@angular/compiler-cli": "4.0.2",
16
-    "@angular/core": "4.0.2",
17
-    "@angular/forms": "4.0.2",
18
-    "@angular/http": "4.0.2",
19
-    "@angular/platform-browser": "4.0.2",
20
-    "@angular/platform-browser-dynamic": "4.0.2",
21
-    "@ionic-native/core": "3.4.2",
22
-    "@ionic-native/splash-screen": "3.4.2",
23
-    "@ionic-native/status-bar": "3.4.2",
24
-    "@ionic/storage": "2.0.1",
25
-    "ionic-angular": "3.1.0",
26
-    "ionicons": "3.0.0",
27
-    "rxjs": "5.1.1",
28
-    "sw-toolbox": "3.4.0",
29
-    "zone.js": "^0.8.5"
30
-  },
31
-  "devDependencies": {
32
-    "@ionic/app-scripts": "1.3.4",
33
-    "@ionic/cli-plugin-ionic-angular": "1.0.0",
34
-    "typescript": "~2.2.1"
35
-  },
36
-  "cordovaPlugins": [
37
-    "cordova-plugin-statusbar",
38
-    "cordova-plugin-whitelist",
39
-    "cordova-plugin-console",
40
-    "cordova-plugin-device",
41
-    "cordova-plugin-splashscreen",
42
-    "ionic-plugin-keyboard"
43
-  ],
44
-  "cordovaPlatforms": [
45
-    "ios",
46
-    {
47
-      "platform": "ios",
48
-      "version": "",
49
-      "locator": "ios"
2
+    "name": "ionic-beer",
3
+    "version": "0.0.1",
4
+    "author": "Ionic Framework",
5
+    "homepage": "http://ionicframework.com/",
6
+    "private": true,
7
+    "scripts": {
8
+        "clean": "ionic-app-scripts clean",
9
+        "build": "ionic-app-scripts build",
10
+        "lint": "ionic-app-scripts lint",
11
+        "ionic:build": "ionic-app-scripts build",
12
+        "ionic:serve": "ionic-app-scripts serve"
13
+    },
14
+    "dependencies": {
15
+        "@angular/common": "4.1.0",
16
+        "@angular/compiler": "4.1.0",
17
+        "@angular/compiler-cli": "4.1.0",
18
+        "@angular/core": "4.1.0",
19
+        "@angular/forms": "4.1.0",
20
+        "@angular/http": "4.1.0",
21
+        "@angular/platform-browser": "4.1.0",
22
+        "@angular/platform-browser-dynamic": "4.1.0",
23
+        "@ionic-native/core": "3.7.0",
24
+        "@ionic-native/splash-screen": "3.7.0",
25
+        "@ionic-native/status-bar": "3.7.0",
26
+        "@ionic/storage": "2.0.1",
27
+        "cordova-android": "^6.2.3",
28
+        "cordova-ios": "^4.4.0",
29
+        "cordova-plugin-console": "^1.0.5",
30
+        "cordova-plugin-device": "^1.1.4",
31
+        "cordova-plugin-splashscreen": "^4.0.3",
32
+        "cordova-plugin-statusbar": "^2.2.2",
33
+        "cordova-plugin-whitelist": "^1.3.1",
34
+        "ionic-angular": "3.2.1",
35
+        "ionic-plugin-keyboard": "^2.2.1",
36
+        "ionicons": "3.0.0",
37
+        "rxjs": "5.1.1",
38
+        "sw-toolbox": "3.6.0",
39
+        "zone.js": "0.8.10"
40
+    },
41
+    "devDependencies": {
42
+        "@ionic/app-scripts": "1.3.7",
43
+        "@ionic/cli-plugin-cordova": "1.0.0",
44
+        "@ionic/cli-plugin-ionic-angular": "1.0.0",
45
+        "typescript": "2.2.1"
46
+    },
47
+    "description": "An Ionic project",
48
+    "cordova": {
49
+        "plugins": {
50
+            "cordova-plugin-console": {},
51
+            "cordova-plugin-device": {},
52
+            "cordova-plugin-splashscreen": {},
53
+            "cordova-plugin-statusbar": {},
54
+            "cordova-plugin-whitelist": {},
55
+            "ionic-plugin-keyboard": {}
56
+        },
57
+        "platforms": [
58
+            "android",
59
+            "ios"
60
+        ]
50 61
     }
51
-  ],
52
-  "description": "ionic-beer: An Ionic project developed with 💙 at Okta"
53
-}
62
+}

BIN
ionic-beer/resources/android/icon/drawable-hdpi-icon.png Целия файл


BIN
ionic-beer/resources/android/icon/drawable-ldpi-icon.png Целия файл


BIN
ionic-beer/resources/android/icon/drawable-mdpi-icon.png Целия файл


BIN
ionic-beer/resources/android/icon/drawable-xhdpi-icon.png Целия файл


BIN
ionic-beer/resources/android/icon/drawable-xxhdpi-icon.png Целия файл


BIN
ionic-beer/resources/android/icon/drawable-xxxhdpi-icon.png Целия файл


BIN
ionic-beer/resources/android/splash/drawable-land-hdpi-screen.png Целия файл


BIN
ionic-beer/resources/android/splash/drawable-land-ldpi-screen.png Целия файл


BIN
ionic-beer/resources/android/splash/drawable-land-mdpi-screen.png Целия файл


BIN
ionic-beer/resources/android/splash/drawable-land-xhdpi-screen.png Целия файл


BIN
ionic-beer/resources/android/splash/drawable-land-xxhdpi-screen.png Целия файл


BIN
ionic-beer/resources/android/splash/drawable-land-xxxhdpi-screen.png Целия файл


BIN
ionic-beer/resources/android/splash/drawable-port-hdpi-screen.png Целия файл


BIN
ionic-beer/resources/android/splash/drawable-port-ldpi-screen.png Целия файл


BIN
ionic-beer/resources/android/splash/drawable-port-mdpi-screen.png Целия файл


BIN
ionic-beer/resources/android/splash/drawable-port-xhdpi-screen.png Целия файл


BIN
ionic-beer/resources/android/splash/drawable-port-xxhdpi-screen.png Целия файл


BIN
ionic-beer/resources/android/splash/drawable-port-xxxhdpi-screen.png Целия файл


BIN
ionic-beer/resources/ios/icon/icon-40.png Целия файл


BIN
ionic-beer/resources/ios/icon/icon-40@2x.png Целия файл


BIN
ionic-beer/resources/ios/icon/icon-40@3x.png Целия файл


BIN
ionic-beer/resources/ios/icon/icon-50.png Целия файл


BIN
ionic-beer/resources/ios/icon/icon-50@2x.png Целия файл


BIN
ionic-beer/resources/ios/icon/icon-60.png Целия файл


BIN
ionic-beer/resources/ios/icon/icon-60@2x.png Целия файл


BIN
ionic-beer/resources/ios/icon/icon-60@3x.png Целия файл


BIN
ionic-beer/resources/ios/icon/icon-72.png Целия файл


BIN
ionic-beer/resources/ios/icon/icon-72@2x.png Целия файл


BIN
ionic-beer/resources/ios/icon/icon-76.png Целия файл


BIN
ionic-beer/resources/ios/icon/icon-76@2x.png Целия файл


BIN
ionic-beer/resources/ios/icon/icon-83.5@2x.png Целия файл


BIN
ionic-beer/resources/ios/icon/icon-small.png Целия файл


BIN
ionic-beer/resources/ios/icon/icon-small@2x.png Целия файл


BIN
ionic-beer/resources/ios/icon/icon-small@3x.png Целия файл


BIN
ionic-beer/resources/ios/icon/icon.png Целия файл


BIN
ionic-beer/resources/ios/icon/icon@2x.png Целия файл


BIN
ionic-beer/resources/ios/splash/Default-568h@2x~iphone.png Целия файл


BIN
ionic-beer/resources/ios/splash/Default-667h.png Целия файл


BIN
ionic-beer/resources/ios/splash/Default-736h.png Целия файл


BIN
ionic-beer/resources/ios/splash/Default-Landscape-736h.png Целия файл


BIN
ionic-beer/resources/ios/splash/Default-Landscape@2x~ipad.png Целия файл


BIN
ionic-beer/resources/ios/splash/Default-Landscape@~ipadpro.png Целия файл


BIN
ionic-beer/resources/ios/splash/Default-Landscape~ipad.png Целия файл


BIN
ionic-beer/resources/ios/splash/Default-Portrait@2x~ipad.png Целия файл


BIN
ionic-beer/resources/ios/splash/Default-Portrait@~ipadpro.png Целия файл


BIN
ionic-beer/resources/ios/splash/Default-Portrait~ipad.png Целия файл


BIN
ionic-beer/resources/ios/splash/Default@2x~iphone.png Целия файл


BIN
ionic-beer/resources/ios/splash/Default~iphone.png Целия файл


BIN
ionic-beer/resources/splash.png Целия файл


+ 3
- 5
ionic-beer/src/app/app.module.ts Целия файл

@@ -10,9 +10,8 @@ import { TabsPage } from '../pages/tabs/tabs';
10 10
 
11 11
 import { StatusBar } from '@ionic-native/status-bar';
12 12
 import { SplashScreen } from '@ionic-native/splash-screen';
13
-import { BeerModule } from '../pages/beer/beer.module';
13
+import { BeerPageModule } from '../pages/beer/beer.module';
14 14
 import { HttpModule } from '@angular/http';
15
-import { BeerModalPage } from '../pages/beer/beer-modal';
16 15
 
17 16
 @NgModule({
18 17
   declarations: [
@@ -26,7 +25,7 @@ import { BeerModalPage } from '../pages/beer/beer-modal';
26 25
     BrowserModule,
27 26
     HttpModule,
28 27
     IonicModule.forRoot(MyApp),
29
-    BeerModule
28
+    BeerPageModule
30 29
   ],
31 30
   bootstrap: [IonicApp],
32 31
   entryComponents: [
@@ -34,8 +33,7 @@ import { BeerModalPage } from '../pages/beer/beer-modal';
34 33
     AboutPage,
35 34
     ContactPage,
36 35
     HomePage,
37
-    TabsPage,
38
-    BeerModalPage
36
+    TabsPage
39 37
   ],
40 38
   providers: [
41 39
     StatusBar,

+ 1
- 1
ionic-beer/src/index.html Целия файл

@@ -18,7 +18,7 @@
18 18
     if ('serviceWorker' in navigator) {
19 19
       navigator.serviceWorker.register('service-worker.js')
20 20
         .then(() => console.log('service worker installed'))
21
-        .catch(err => console.log('Error', err));
21
+        .catch(err => console.error('Error', err));
22 22
     }
23 23
   </script>
24 24
 

+ 3
- 3
ionic-beer/src/manifest.json Целия файл

@@ -1,6 +1,6 @@
1 1
 {
2
-  "name": "Ionic Beers",
3
-  "short_name": "Ionic Beers",
2
+  "name": "Ionic",
3
+  "short_name": "Ionic",
4 4
   "start_url": "index.html",
5 5
   "display": "standalone",
6 6
   "icons": [{
@@ -10,4 +10,4 @@
10 10
   }],
11 11
   "background_color": "#4e8ef7",
12 12
   "theme_color": "#4e8ef7"
13
-}
13
+}

+ 1
- 1
ionic-beer/src/pages/beer/beer-modal.ts Целия файл

@@ -32,7 +32,7 @@ export class BeerModalPage {
32 32
   }
33 33
 
34 34
   save(form: NgForm) {
35
-    let update: boolean = form['id'];
35
+    let update: boolean = form['href'];
36 36
     this.beerService.save(form).subscribe(result => {
37 37
       let toast = this.toastCtrl.create({
38 38
         message: 'Beer "' + form.name + '" ' + ((update) ? 'updated' : 'added') + '.',

+ 0
- 1
ionic-beer/src/pages/beer/beer.html Целия файл

@@ -8,7 +8,6 @@
8 8
       </button>
9 9
     </ion-buttons>
10 10
   </ion-navbar>
11
-
12 11
 </ion-header>
13 12
 
14 13
 <ion-content padding>

+ 8
- 6
ionic-beer/src/pages/beer/beer.module.ts Целия файл

@@ -1,9 +1,9 @@
1 1
 import { NgModule } from '@angular/core';
2
-import { IonicModule } from 'ionic-angular';
2
+import { IonicPageModule } from 'ionic-angular';
3 3
 import { BeerPage } from './beer';
4
-import { BeerModalPage } from './beer-modal';
5 4
 import { BeerService } from '../../providers/beer-service';
6 5
 import { GiphyService } from '../../providers/giphy-service';
6
+import { BeerModalPage } from './beer-modal';
7 7
 
8 8
 @NgModule({
9 9
   declarations: [
@@ -11,15 +11,17 @@ import { GiphyService } from '../../providers/giphy-service';
11 11
     BeerModalPage
12 12
   ],
13 13
   imports: [
14
-    IonicModule.forRoot(BeerPage)
14
+    IonicPageModule.forChild(BeerPage),
15 15
   ],
16 16
   exports: [
17
-    BeerPage,
18
-    BeerModalPage
17
+    BeerPage
19 18
   ],
20 19
   providers: [
21 20
     BeerService,
22 21
     GiphyService
22
+  ],
23
+  entryComponents: [
24
+    BeerModalPage
23 25
   ]
24 26
 })
25
-export class BeerModule {}
27
+export class BeerPageModule {}

+ 6
- 6
ionic-beer/src/pages/beer/beer.ts Целия файл

@@ -7,20 +7,20 @@ import { BeerModalPage } from './beer-modal';
7 7
 @IonicPage()
8 8
 @Component({
9 9
   selector: 'page-beer',
10
-  templateUrl: 'beer.html'
10
+  templateUrl: 'beer.html',
11 11
 })
12 12
 export class BeerPage {
13 13
   private beers: Array<any>;
14 14
 
15
-constructor(public navCtrl: NavController, public navParams: NavParams,
16
-          public beerService: BeerService, public giphyService: GiphyService,
17
-          public modalCtrl: ModalController, public toastCtrl: ToastController) {
18
-}
15
+  constructor(public navCtrl: NavController, public navParams: NavParams,
16
+              public beerService: BeerService, public giphyService: GiphyService,
17
+              public modalCtrl: ModalController, public toastCtrl: ToastController) {
18
+  }
19 19
 
20 20
   ionViewDidLoad() {
21 21
     this.beerService.getGoodBeers().subscribe(beers => {
22 22
       this.beers = beers;
23
-      for (let beer of this.beers) {
23
+      for (const beer of this.beers) {
24 24
         this.giphyService.get(beer.name).subscribe(url => {
25 25
           beer.giphyUrl = url
26 26
         });

+ 2
- 2
ionic-beer/src/pages/tabs/tabs.html Целия файл

@@ -1,6 +1,6 @@
1 1
 <ion-tabs>
2 2
   <ion-tab [root]="tab1Root" tabTitle="Home" tabIcon="home"></ion-tab>
3 3
   <ion-tab [root]="tab2Root" tabTitle="Beer" tabIcon="beer"></ion-tab>
4
-  <ion-tab [root]="tab3Root" tabTitle="Contact" tabIcon="contacts"></ion-tab>
5
-  <ion-tab [root]="tab4Root" tabTitle="About" tabIcon="information-circle"></ion-tab>
4
+  <ion-tab [root]="tab3Root" tabTitle="About" tabIcon="information-circle"></ion-tab>
5
+  <ion-tab [root]="tab4Root" tabTitle="Contact" tabIcon="contacts"></ion-tab>
6 6
 </ion-tabs>

+ 8
- 5
ionic-beer/src/pages/tabs/tabs.ts Целия файл

@@ -9,10 +9,13 @@ import { BeerPage } from '../beer/beer';
9 9
   templateUrl: 'tabs.html'
10 10
 })
11 11
 export class TabsPage {
12
-  tab1Root: any = HomePage;
13
-  tab2Root: any = BeerPage;
14
-  tab3Root: any = ContactPage;
15
-  tab4Root: any = AboutPage;
16 12
 
17
-  constructor() {}
13
+  tab1Root = HomePage;
14
+  tab2Root = BeerPage;
15
+  tab3Root = AboutPage;
16
+  tab4Root = ContactPage;
17
+
18
+  constructor() {
19
+
20
+  }
18 21
 }

+ 2
- 1
ionic-beer/src/providers/beer-service.ts Целия файл

@@ -1,6 +1,7 @@
1 1
 import { Injectable } from '@angular/core';
2 2
 import { Http, Response } from '@angular/http';
3 3
 import 'rxjs/add/operator/map';
4
+import 'rxjs/add/operator/catch';
4 5
 import { Observable } from 'rxjs';
5 6
 
6 7
 @Injectable()
@@ -8,7 +9,7 @@ export class BeerService {
8 9
   public API = 'http://localhost:8080';
9 10
   public BEER_API = this.API + '/beers';
10 11
 
11
-  constructor(private http: Http) {}
12
+  constructor(public http: Http) {}
12 13
 
13 14
   getGoodBeers(): Observable<any> {
14 15
     return this.http.get(this.API + '/good-beers')

+ 2
- 3
ionic-beer/src/providers/giphy-service.ts Целия файл

@@ -6,16 +6,15 @@ import { Observable } from 'rxjs';
6 6
 // http://tutorials.pluralsight.com/front-end-javascript/getting-started-with-angular-2-by-building-a-giphy-search-application
7 7
 export class GiphyService {
8 8
 
9
-  // Public beta key: https://github.com/Giphy/GiphyAPI#public-beta-key
10 9
   giphyApi = 'https://api.giphy.com/v1/gifs/search?api_key=dc6zaTOxFJmzC&q=';
11 10
 
12 11
   constructor(public http: Http) {
13 12
   }
14 13
 
15 14
   get(searchTerm): Observable<any> {
16
-    let apiLink = this.giphyApi + searchTerm;
15
+    const apiLink = this.giphyApi + searchTerm;
17 16
     return this.http.request(apiLink).map((res: Response) => {
18
-      let results = res.json().data;
17
+      const results = res.json().data;
19 18
       if (results.length > 0) {
20 19
         return results[0].images.original.url;
21 20
       } else {

+ 2
- 2
ionic-beer/src/service-worker.js Целия файл

@@ -1,5 +1,5 @@
1 1
 /**
2
- * Check out https://googlechrome.github.io/sw-toolbox/docs/master/index.html for
2
+ * Check out https://googlechrome.github.io/sw-toolbox/ for
3 3
  * more info on how to use sw-toolbox to custom configure your service worker.
4 4
  */
5 5
 
@@ -27,4 +27,4 @@ self.toolbox.router.any('/*', self.toolbox.cacheFirst);
27 27
 
28 28
 // for any other requests go to the network, cache,
29 29
 // and then only use that cached resource if your user goes offline
30
-self.toolbox.router.default = self.toolbox.networkFirst;
30
+self.toolbox.router.default = self.toolbox.networkFirst;

+ 0
- 3347
ionic-beer/yarn.lock
Файловите разлики са ограничени, защото са твърде много
Целия файл