浏览代码

Initial Tested.

Kr Younger 6 年前
当前提交
2ecb5f3a73
共有 100 个文件被更改,包括 7479 次插入0 次删除
  1. 21
    0
      .gitignore
  2. 152
    0
      DEMO.md
  3. 201
    0
      LICENSE
  4. 17
    0
      README.md
  5. 67
    0
      deploy.sh
  6. 17
    0
      ionic-zipteam/.editorconfig
  7. 35
    0
      ionic-zipteam/.gitignore
  8. 86
    0
      ionic-zipteam/config.xml
  9. 8
    0
      ionic-zipteam/ionic.config.json
  10. 6090
    0
      ionic-zipteam/package-lock.json
  11. 58
    0
      ionic-zipteam/package.json
  12. 8
    0
      ionic-zipteam/resources/README.md
  13. 二进制
      ionic-zipteam/resources/android/icon/drawable-hdpi-icon.png
  14. 二进制
      ionic-zipteam/resources/android/icon/drawable-ldpi-icon.png
  15. 二进制
      ionic-zipteam/resources/android/icon/drawable-mdpi-icon.png
  16. 二进制
      ionic-zipteam/resources/android/icon/drawable-xhdpi-icon.png
  17. 二进制
      ionic-zipteam/resources/android/icon/drawable-xxhdpi-icon.png
  18. 二进制
      ionic-zipteam/resources/android/icon/drawable-xxxhdpi-icon.png
  19. 二进制
      ionic-zipteam/resources/android/splash/drawable-land-hdpi-screen.png
  20. 二进制
      ionic-zipteam/resources/android/splash/drawable-land-ldpi-screen.png
  21. 二进制
      ionic-zipteam/resources/android/splash/drawable-land-mdpi-screen.png
  22. 二进制
      ionic-zipteam/resources/android/splash/drawable-land-xhdpi-screen.png
  23. 二进制
      ionic-zipteam/resources/android/splash/drawable-land-xxhdpi-screen.png
  24. 二进制
      ionic-zipteam/resources/android/splash/drawable-land-xxxhdpi-screen.png
  25. 二进制
      ionic-zipteam/resources/android/splash/drawable-port-hdpi-screen.png
  26. 二进制
      ionic-zipteam/resources/android/splash/drawable-port-ldpi-screen.png
  27. 二进制
      ionic-zipteam/resources/android/splash/drawable-port-mdpi-screen.png
  28. 二进制
      ionic-zipteam/resources/android/splash/drawable-port-xhdpi-screen.png
  29. 二进制
      ionic-zipteam/resources/android/splash/drawable-port-xxhdpi-screen.png
  30. 二进制
      ionic-zipteam/resources/android/splash/drawable-port-xxxhdpi-screen.png
  31. 二进制
      ionic-zipteam/resources/icon.png
  32. 二进制
      ionic-zipteam/resources/ios/icon/icon-1024.png
  33. 二进制
      ionic-zipteam/resources/ios/icon/icon-40.png
  34. 二进制
      ionic-zipteam/resources/ios/icon/icon-40@2x.png
  35. 二进制
      ionic-zipteam/resources/ios/icon/icon-40@3x.png
  36. 二进制
      ionic-zipteam/resources/ios/icon/icon-50.png
  37. 二进制
      ionic-zipteam/resources/ios/icon/icon-50@2x.png
  38. 二进制
      ionic-zipteam/resources/ios/icon/icon-60.png
  39. 二进制
      ionic-zipteam/resources/ios/icon/icon-60@2x.png
  40. 二进制
      ionic-zipteam/resources/ios/icon/icon-60@3x.png
  41. 二进制
      ionic-zipteam/resources/ios/icon/icon-72.png
  42. 二进制
      ionic-zipteam/resources/ios/icon/icon-72@2x.png
  43. 二进制
      ionic-zipteam/resources/ios/icon/icon-76.png
  44. 二进制
      ionic-zipteam/resources/ios/icon/icon-76@2x.png
  45. 二进制
      ionic-zipteam/resources/ios/icon/icon-83.5@2x.png
  46. 二进制
      ionic-zipteam/resources/ios/icon/icon-small.png
  47. 二进制
      ionic-zipteam/resources/ios/icon/icon-small@2x.png
  48. 二进制
      ionic-zipteam/resources/ios/icon/icon-small@3x.png
  49. 二进制
      ionic-zipteam/resources/ios/icon/icon.png
  50. 二进制
      ionic-zipteam/resources/ios/icon/icon@2x.png
  51. 二进制
      ionic-zipteam/resources/ios/splash/Default-568h@2x~iphone.png
  52. 二进制
      ionic-zipteam/resources/ios/splash/Default-667h.png
  53. 二进制
      ionic-zipteam/resources/ios/splash/Default-736h.png
  54. 二进制
      ionic-zipteam/resources/ios/splash/Default-Landscape-736h.png
  55. 二进制
      ionic-zipteam/resources/ios/splash/Default-Landscape@2x~ipad.png
  56. 二进制
      ionic-zipteam/resources/ios/splash/Default-Landscape@~ipadpro.png
  57. 二进制
      ionic-zipteam/resources/ios/splash/Default-Landscape~ipad.png
  58. 二进制
      ionic-zipteam/resources/ios/splash/Default-Portrait@2x~ipad.png
  59. 二进制
      ionic-zipteam/resources/ios/splash/Default-Portrait@~ipadpro.png
  60. 二进制
      ionic-zipteam/resources/ios/splash/Default-Portrait~ipad.png
  61. 二进制
      ionic-zipteam/resources/ios/splash/Default@2x~iphone.png
  62. 二进制
      ionic-zipteam/resources/ios/splash/Default@2x~universal~anyany.png
  63. 二进制
      ionic-zipteam/resources/ios/splash/Default~iphone.png
  64. 二进制
      ionic-zipteam/resources/splash.png
  65. 22
    0
      ionic-zipteam/src/app/app.component.ts
  66. 1
    0
      ionic-zipteam/src/app/app.html
  67. 46
    0
      ionic-zipteam/src/app/app.module.ts
  68. 16
    0
      ionic-zipteam/src/app/app.scss
  69. 5
    0
      ionic-zipteam/src/app/main.ts
  70. 二进制
      ionic-zipteam/src/assets/icon/favicon.ico
  71. 二进制
      ionic-zipteam/src/assets/imgs/BardBeer.png
  72. 二进制
      ionic-zipteam/src/assets/imgs/SlackMeme.png
  73. 二进制
      ionic-zipteam/src/assets/imgs/WilderBeer.png
  74. 二进制
      ionic-zipteam/src/assets/imgs/logo.png
  75. 51
    0
      ionic-zipteam/src/index.html
  76. 13
    0
      ionic-zipteam/src/manifest.json
  77. 13
    0
      ionic-zipteam/src/pages/about/about.html
  78. 3
    0
      ionic-zipteam/src/pages/about/about.scss
  79. 14
    0
      ionic-zipteam/src/pages/about/about.ts
  80. 18
    0
      ionic-zipteam/src/pages/home/home.html
  81. 3
    0
      ionic-zipteam/src/pages/home/home.scss
  82. 14
    0
      ionic-zipteam/src/pages/home/home.ts
  83. 40
    0
      ionic-zipteam/src/pages/post/post-modal.html
  84. 52
    0
      ionic-zipteam/src/pages/post/post-modal.ts
  85. 35
    0
      ionic-zipteam/src/pages/post/post.html
  86. 24
    0
      ionic-zipteam/src/pages/post/post.module.ts
  87. 3
    0
      ionic-zipteam/src/pages/post/post.scss
  88. 57
    0
      ionic-zipteam/src/pages/post/post.ts
  89. 6
    0
      ionic-zipteam/src/pages/tabs/tabs.html
  90. 20
    0
      ionic-zipteam/src/pages/tabs/tabs.ts
  91. 17
    0
      ionic-zipteam/src/pages/user/user.html
  92. 3
    0
      ionic-zipteam/src/pages/user/user.scss
  93. 14
    0
      ionic-zipteam/src/pages/user/user.ts
  94. 25
    0
      ionic-zipteam/src/providers/giphy-service.ts
  95. 46
    0
      ionic-zipteam/src/providers/post-service.ts
  96. 31
    0
      ionic-zipteam/src/service-worker.js
  97. 88
    0
      ionic-zipteam/src/theme/variables.scss
  98. 28
    0
      ionic-zipteam/tsconfig.json
  99. 11
    0
      ionic-zipteam/tslint.json
  100. 0
    0
      package-lock.json

+ 21
- 0
.gitignore 查看文件

@@ -0,0 +1,21 @@
1
+### STS ###
2
+.apt_generated
3
+.classpath
4
+.factorypath
5
+.project
6
+.settings
7
+.springBeans
8
+
9
+### IntelliJ IDEA ###
10
+.idea
11
+*.iws
12
+*.iml
13
+*.ipr
14
+
15
+### NetBeans ###
16
+nbproject/private/
17
+build/
18
+nbbuild/
19
+dist/
20
+nbdist/
21
+.nb-gradle/

+ 152
- 0
DEMO.md 查看文件

@@ -0,0 +1,152 @@
1
+## Spring Boot API
2
+
3
+Create your Spring Boot API project using [start.spring.io](https://start.spring.io) or the command line.
4
+
5
+```
6
+http https://start.spring.io/starter.zip \
7
+dependencies==data-jpa,data-rest,h2,web,devtools -d
8
+```
9
+
10
+1. Open project in IntelliJ IDEA. Create a `Beer` entity class in `src/main/java/com/example/demo/beer`. → **boot-entity**
11
+2. Create a JPA Repository to manage the `Beer` entity (tip: `@RepositoryRestResource`). → **boot-repository**
12
+3. Create a CommandLineRunner to populate the database. → **boot-command**
13
+4. Add default data in the `run()` method. → **boot-add**
14
+5. Create a `BeerController` for your REST API. Add some business logic that results in a `/good-beers` endpoint. → **boot-controller**
15
+6. Add a `/good-beers` mapping that filters out beers that aren't great. → **boot-good**
16
+
17
+## Create Ionic App
18
+
19
+Install Ionic and Cordova: 
20
+
21
+```
22
+yarn global add cordova ionic
23
+```
24
+
25
+From a terminal window, create a new application using the following command:
26
+
27
+```
28
+ionic start ionic-beer
29
+cd ionic-beer
30
+ionic serve
31
+```
32
+
33
+## Build a Good Beers UI
34
+
35
+1. Run `ionic generate page beer`. 
36
+2. Add `BeerPageModule` to the `imports` list in `app.module.ts`.
37
+3. Create `src/providers/beer-service.ts`. → **io-beer-service**
38
+5. Modify `beer.html` to show the list of beers. → **io-beer-list**
39
+6. Update `beer.ts` to import `BeerService` and add as a provider. Call the `getGoodBeers()` method in the `ionViewDidLoad()` lifecycle method. → **io-get-good-beers**
40
+7. To expose this page on the tab bar, add it to `tabs.ts`. Update `tabs.html` too!
41
+
42
+If you run `ionic serve`, you’ll likely see a CORS error in your browser’s console. To fix this, open your `BeerController` and add the following line to the good beers endpoint.
43
+
44
+```
45
+@CrossOrigin(origins = {"http://localhost:8100","file://"})
46
+```
47
+
48
+Restart Spring Boot and your Ionic app. 
49
+
50
+Add some fun with Giphy! Create `giphy-service.ts`. → **ng-giphy-service**
51
+
52
+Update `beer.ts` to take advantage of `GiphyService`. → **ng-giphy-foreach**
53
+
54
+Update `beer.html` to display the image retrieved. → **io-avatar**
55
+
56
+If everything works as expected, you should see a page with a list of beers and images.
57
+
58
+### Add a Modal for Editing
59
+
60
+Change the header in `beer.html` to have a button that opens a modal to add a new beer. → **io-open-modal**
61
+
62
+In this same file, change `<ion-item>` to have a click handler for opening the modal for the current item.
63
+
64
+```html
65
+<ion-item (click)="openModal({id: beer.id})">
66
+```
67
+
68
+Add `ModalController` as a dependency in `BeerPage` and add an `openModal()` method. → **io-open-modal-ts**
69
+
70
+This won't compile because `BeerModalPage` doesn't exist. Create `beer-modal.ts` in the same directory. → **io-beer-modal**
71
+
72
+Create `beer-modal.html` as a template for this page. → **io-beer-modal-html**
73
+
74
+Import `BeerModalPage` in `beer.ts` and add it to the `declarations` and `entryComponents` lists in `beer.module.ts`.
75
+
76
+You'll also need to modify `beer-service.ts` to have `get()` and `save()` methods. → **io-get-save**
77
+
78
+Demo how editing fails, then add `CrossOrigin` annotation to `BeerRepository`.
79
+
80
+```java
81
+@CrossOrigin(origins = {"http://localhost:8100","file://"})
82
+```
83
+
84
+### Add Swipe to Delete
85
+
86
+To add swipe-to-delete functionality on the list of beers, open `beer.html` and make it so `<ion-item-sliding>` wraps `<ion-item>` and contains the `*ngFor`. → **io-swipe**
87
+
88
+Add a `remove()` method to `beer.ts`. → **io-remove**
89
+
90
+Add `toastCtrl: ToastController` as a dependency in the constructor so everything compiles.
91
+
92
+After making these additions, you should be able to add, edit and delete beers.
93
+
94
+## PWAs with Ionic
95
+
96
+Run the [Lighthouse Chrome extension](https://developers.google.com/web/tools/lighthouse/) on this application. To register a service worker, and improve the app’s score, uncomment the `serviceWorker` block in `index.html`.
97
+
98
+After making this change, the score should improve. In my tests, it increased to 75/100.  
99
+
100
+If you refresh the app and Chrome doesn’t prompt you to install the app (a PWA feature), you probably need to turn on a couple of features. 
101
+
102
+```
103
+chrome://flags/#bypass-app-banner-engagement-checks
104
+chrome://flags/#enable-add-to-shelf
105
+```
106
+
107
+After enabling these flags, you’ll see an error in your browser’s console about `assets/imgs/logo.png` not being found. This files is referenced in `src/manifest.json`. You can fix this by copying a 512x512 PNG into this location or by modifying `manifest.json` accordingly.
108
+
109
+## Deploy to a Mobile Device
110
+
111
+To see how your application will look on different devices you can run `ionic serve --lab`. The `--lab` flag opens opens a page in your browser that lets you see how your app looks on different devices. 
112
+
113
+### iOS
114
+
115
+To emulate or deploy to an iOS device, you’ll need a Mac and a fresh installation of [Xcode](https://developer.apple.com/xcode/). If you’d like to build iOS apps on Windows, Ionic offers an [Ionic Package](http://ionic.io/cloud#packaging) service.
116
+
117
+```
118
+npm install -g ios-sim
119
+ionic cordova emulate ios
120
+```
121
+
122
+If this fails, run the following to open/deploy the project.
123
+
124
+```
125
+open platforms/ios/MyApp.xcodeproj
126
+```
127
+
128
+The biggest problem I found when running the app in Simulator was that it was difficult to get the keyboard to popup. To workaround this, I used Edit > Hardware > Keyboard > Toggle Software Keyboard when I needed to type text in a field.
129
+
130
+In order to deploy the app to a phone, you'll need to deploy the backend to a public server. Copy `deploy.sh` from 
131
+[spring-boot-ionic-example](https://github.com/oktadeveloper/spring-boot-ionic-example) and run it to deploy the backend
132
+to Cloud Foundry.
133
+
134
+If this fails, run the following to open/deploy the project.
135
+
136
+```
137
+open platforms/ios/MyApp.xcodeproj
138
+```
139
+
140
+Select your phone as the target in Xcode and click the play button to run your app. 
141
+
142
+### Android
143
+
144
+To deploy to the Android emulator, run `ionic cordova emulate android`.
145
+
146
+```
147
+AVD Name: TestPhone
148
+Device: Nexus 5
149
+Target: Android 7.1.1
150
+CPU/ABI: Google APIs Intel Axom (x86_64)
151
+Skin: Skin with dynamic hardware controls
152
+```

+ 201
- 0
LICENSE 查看文件

@@ -0,0 +1,201 @@
1
+                                 Apache License
2
+                           Version 2.0, January 2004
3
+                        http://www.apache.org/licenses/
4
+
5
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+   1. Definitions.
8
+
9
+      "License" shall mean the terms and conditions for use, reproduction,
10
+      and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+      "Licensor" shall mean the copyright owner or entity authorized by
13
+      the copyright owner that is granting the License.
14
+
15
+      "Legal Entity" shall mean the union of the acting entity and all
16
+      other entities that control, are controlled by, or are under common
17
+      control with that entity. For the purposes of this definition,
18
+      "control" means (i) the power, direct or indirect, to cause the
19
+      direction or management of such entity, whether by contract or
20
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+      outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+      "You" (or "Your") shall mean an individual or Legal Entity
24
+      exercising permissions granted by this License.
25
+
26
+      "Source" form shall mean the preferred form for making modifications,
27
+      including but not limited to software source code, documentation
28
+      source, and configuration files.
29
+
30
+      "Object" form shall mean any form resulting from mechanical
31
+      transformation or translation of a Source form, including but
32
+      not limited to compiled object code, generated documentation,
33
+      and conversions to other media types.
34
+
35
+      "Work" shall mean the work of authorship, whether in Source or
36
+      Object form, made available under the License, as indicated by a
37
+      copyright notice that is included in or attached to the work
38
+      (an example is provided in the Appendix below).
39
+
40
+      "Derivative Works" shall mean any work, whether in Source or Object
41
+      form, that is based on (or derived from) the Work and for which the
42
+      editorial revisions, annotations, elaborations, or other modifications
43
+      represent, as a whole, an original work of authorship. For the purposes
44
+      of this License, Derivative Works shall not include works that remain
45
+      separable from, or merely link (or bind by name) to the interfaces of,
46
+      the Work and Derivative Works thereof.
47
+
48
+      "Contribution" shall mean any work of authorship, including
49
+      the original version of the Work and any modifications or additions
50
+      to that Work or Derivative Works thereof, that is intentionally
51
+      submitted to Licensor for inclusion in the Work by the copyright owner
52
+      or by an individual or Legal Entity authorized to submit on behalf of
53
+      the copyright owner. For the purposes of this definition, "submitted"
54
+      means any form of electronic, verbal, or written communication sent
55
+      to the Licensor or its representatives, including but not limited to
56
+      communication on electronic mailing lists, source code control systems,
57
+      and issue tracking systems that are managed by, or on behalf of, the
58
+      Licensor for the purpose of discussing and improving the Work, but
59
+      excluding communication that is conspicuously marked or otherwise
60
+      designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+      "Contributor" shall mean Licensor and any individual or Legal Entity
63
+      on behalf of whom a Contribution has been received by Licensor and
64
+      subsequently incorporated within the Work.
65
+
66
+   2. Grant of Copyright License. Subject to the terms and conditions of
67
+      this License, each Contributor hereby grants to You a perpetual,
68
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+      copyright license to reproduce, prepare Derivative Works of,
70
+      publicly display, publicly perform, sublicense, and distribute the
71
+      Work and such Derivative Works in Source or Object form.
72
+
73
+   3. Grant of Patent License. Subject to the terms and conditions of
74
+      this License, each Contributor hereby grants to You a perpetual,
75
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+      (except as stated in this section) patent license to make, have made,
77
+      use, offer to sell, sell, import, and otherwise transfer the Work,
78
+      where such license applies only to those patent claims licensable
79
+      by such Contributor that are necessarily infringed by their
80
+      Contribution(s) alone or by combination of their Contribution(s)
81
+      with the Work to which such Contribution(s) was submitted. If You
82
+      institute patent litigation against any entity (including a
83
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+      or a Contribution incorporated within the Work constitutes direct
85
+      or contributory patent infringement, then any patent licenses
86
+      granted to You under this License for that Work shall terminate
87
+      as of the date such litigation is filed.
88
+
89
+   4. Redistribution. You may reproduce and distribute copies of the
90
+      Work or Derivative Works thereof in any medium, with or without
91
+      modifications, and in Source or Object form, provided that You
92
+      meet the following conditions:
93
+
94
+      (a) You must give any other recipients of the Work or
95
+          Derivative Works a copy of this License; and
96
+
97
+      (b) You must cause any modified files to carry prominent notices
98
+          stating that You changed the files; and
99
+
100
+      (c) You must retain, in the Source form of any Derivative Works
101
+          that You distribute, all copyright, patent, trademark, and
102
+          attribution notices from the Source form of the Work,
103
+          excluding those notices that do not pertain to any part of
104
+          the Derivative Works; and
105
+
106
+      (d) If the Work includes a "NOTICE" text file as part of its
107
+          distribution, then any Derivative Works that You distribute must
108
+          include a readable copy of the attribution notices contained
109
+          within such NOTICE file, excluding those notices that do not
110
+          pertain to any part of the Derivative Works, in at least one
111
+          of the following places: within a NOTICE text file distributed
112
+          as part of the Derivative Works; within the Source form or
113
+          documentation, if provided along with the Derivative Works; or,
114
+          within a display generated by the Derivative Works, if and
115
+          wherever such third-party notices normally appear. The contents
116
+          of the NOTICE file are for informational purposes only and
117
+          do not modify the License. You may add Your own attribution
118
+          notices within Derivative Works that You distribute, alongside
119
+          or as an addendum to the NOTICE text from the Work, provided
120
+          that such additional attribution notices cannot be construed
121
+          as modifying the License.
122
+
123
+      You may add Your own copyright statement to Your modifications and
124
+      may provide additional or different license terms and conditions
125
+      for use, reproduction, or distribution of Your modifications, or
126
+      for any such Derivative Works as a whole, provided Your use,
127
+      reproduction, and distribution of the Work otherwise complies with
128
+      the conditions stated in this License.
129
+
130
+   5. Submission of Contributions. Unless You explicitly state otherwise,
131
+      any Contribution intentionally submitted for inclusion in the Work
132
+      by You to the Licensor shall be under the terms and conditions of
133
+      this License, without any additional terms or conditions.
134
+      Notwithstanding the above, nothing herein shall supersede or modify
135
+      the terms of any separate license agreement you may have executed
136
+      with Licensor regarding such Contributions.
137
+
138
+   6. Trademarks. This License does not grant permission to use the trade
139
+      names, trademarks, service marks, or product names of the Licensor,
140
+      except as required for reasonable and customary use in describing the
141
+      origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+   7. Disclaimer of Warranty. Unless required by applicable law or
144
+      agreed to in writing, Licensor provides the Work (and each
145
+      Contributor provides its Contributions) on an "AS IS" BASIS,
146
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+      implied, including, without limitation, any warranties or conditions
148
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+      PARTICULAR PURPOSE. You are solely responsible for determining the
150
+      appropriateness of using or redistributing the Work and assume any
151
+      risks associated with Your exercise of permissions under this License.
152
+
153
+   8. Limitation of Liability. In no event and under no legal theory,
154
+      whether in tort (including negligence), contract, or otherwise,
155
+      unless required by applicable law (such as deliberate and grossly
156
+      negligent acts) or agreed to in writing, shall any Contributor be
157
+      liable to You for damages, including any direct, indirect, special,
158
+      incidental, or consequential damages of any character arising as a
159
+      result of this License or out of the use or inability to use the
160
+      Work (including but not limited to damages for loss of goodwill,
161
+      work stoppage, computer failure or malfunction, or any and all
162
+      other commercial damages or losses), even if such Contributor
163
+      has been advised of the possibility of such damages.
164
+
165
+   9. Accepting Warranty or Additional Liability. While redistributing
166
+      the Work or Derivative Works thereof, You may choose to offer,
167
+      and charge a fee for, acceptance of support, warranty, indemnity,
168
+      or other liability obligations and/or rights consistent with this
169
+      License. However, in accepting such obligations, You may act only
170
+      on Your own behalf and on Your sole responsibility, not on behalf
171
+      of any other Contributor, and only if You agree to indemnify,
172
+      defend, and hold each Contributor harmless for any liability
173
+      incurred by, or claims asserted against, such Contributor by reason
174
+      of your accepting any such warranty or additional liability.
175
+
176
+   END OF TERMS AND CONDITIONS
177
+
178
+   APPENDIX: How to apply the Apache License to your work.
179
+
180
+      To apply the Apache License to your work, attach the following
181
+      boilerplate notice, with the fields enclosed by brackets "{}"
182
+      replaced with your own identifying information. (Don't include
183
+      the brackets!)  The text should be enclosed in the appropriate
184
+      comment syntax for the file format. We also recommend that a
185
+      file or class name and description of purpose be included on the
186
+      same "printed page" as the copyright notice for easier
187
+      identification within third-party archives.
188
+
189
+   Copyright 2017 Okta, Inc.
190
+
191
+   Licensed under the Apache License, Version 2.0 (the "License");
192
+   you may not use this file except in compliance with the License.
193
+   You may obtain a copy of the License at
194
+
195
+       http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+   Unless required by applicable law or agreed to in writing, software
198
+   distributed under the License is distributed on an "AS IS" BASIS,
199
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+   See the License for the specific language governing permissions and
201
+   limitations under the License.

+ 17
- 0
README.md 查看文件

@@ -0,0 +1,17 @@
1
+# Spring Boot + Ionic 🍻
2
+
3
+This project is an example application for a typical [Ionic](https://ionicframework.com/) app with a [Spring Boot](https://projects.spring.io/spring-boot/) backend.
4
+
5
+You can read about how this application was created in [Develop a Mobile App With Ionic and Spring Boot](http://developer.okta.com/blog/2017/05/17/develop-a-mobile-app-with-ionic-and-spring-boot). Feel free to copy any code in this project for your own use in accordance with the [Apache license](LICENSE).
6
+
7
+**Prerequisites**: Java 8 and Node.js.
8
+
9
+To run the Spring Boot backend, cd into `server` and run `mvn spring-boot:run`.
10
+
11
+In another terminal window, install Ionic and Cordova.
12
+
13
+```
14
+npm install -g ionic cordova
15
+```
16
+
17
+Next, cd into `client` and execute `npm install && ionic serve`. The aforementioned [tutorial](http://developer.okta.com/blog/2017/05/17/develop-a-mobile-app-with-ionic-and-spring-boot) shows you how to deploy this app to an emulator/device. 

+ 67
- 0
deploy.sh 查看文件

@@ -0,0 +1,67 @@
1
+#!/bin/bash
2
+# Warning: this script has only been tested on macOS Sierra. There's a good chance
3
+# it won't work on other operating systems. If you get it working on another OS,
4
+# please send a pull request with any changes required. Thanks!
5
+set -e
6
+
7
+### CloudFoundry CLI utilities
8
+CLOUD_DOMAIN=${DOMAIN:-run.pivotal.io}
9
+CLOUD_TARGET=api.${DOMAIN}
10
+
11
+function login(){
12
+    cf api | grep ${CLOUD_TARGET} || cf api ${CLOUD_TARGET} --skip-ssl-validation
13
+    cf apps | grep OK || cf login
14
+}
15
+
16
+function app_domain(){
17
+    D=`cf apps | grep $1 | tr -s ' ' | cut -d' ' -f 6 | cut -d, -f1`
18
+    echo $D
19
+}
20
+
21
+function deploy_service(){
22
+    N=$1
23
+    D=`app_domain $N`
24
+    JSON='{"uri":"http://'$D'"}'
25
+    cf create-user-provided-service $N -p $JSON
26
+}
27
+
28
+### Installation
29
+
30
+cd `dirname $0`
31
+r=`pwd`
32
+echo $r
33
+
34
+## Reset
35
+cf d -f ionic-server
36
+
37
+cf a
38
+
39
+# Deploy the server
40
+cd $r/server
41
+mvn clean package
42
+cf push -p target/*jar ionic-server --no-start --random-route
43
+cf set-env ionic-server FORCE_HTTPS true
44
+cf start ionic-server
45
+
46
+# Get the URL for the server
47
+serverUri=https://`app_domain ionic-server`
48
+
49
+# Deploy the client
50
+cd $r/ionic-beer
51
+npm run clean
52
+# replace the server URL in the client
53
+sed -i -e "s|http://localhost:8080|$serverUri|g" src/providers/beer-service.ts
54
+npm install
55
+
56
+# build ios
57
+ionic cordova build ios --prod
58
+# Run on ios
59
+ionic cordova run ios 
60
+
61
+# If the above command fails with the following error:
62
+# xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH
63
+# See http://stackoverflow.com/a/43363820
64
+
65
+# cleanup changed files
66
+sed -i -e "s|$serverUri|http://localhost:8080|g" src/providers/beer-service.ts
67
+rm $r/ionic-beer/src/providers/beer-service.ts-e

+ 17
- 0
ionic-zipteam/.editorconfig 查看文件

@@ -0,0 +1,17 @@
1
+# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
2
+# editorconfig.org
3
+
4
+root = true
5
+
6
+[*]
7
+indent_style = space
8
+indent_size = 2
9
+
10
+# We recommend you to keep these unchanged
11
+end_of_line = lf
12
+charset = utf-8
13
+trim_trailing_whitespace = true
14
+insert_final_newline = true
15
+
16
+[*.md]
17
+trim_trailing_whitespace = false

+ 35
- 0
ionic-zipteam/.gitignore 查看文件

@@ -0,0 +1,35 @@
1
+# Specifies intentionally untracked files to ignore when using Git
2
+# http://git-scm.com/docs/gitignore
3
+
4
+*~
5
+*.sw[mnpcod]
6
+*.log
7
+*.tmp
8
+*.tmp.*
9
+log.txt
10
+*.sublime-project
11
+*.sublime-workspace
12
+.vscode/
13
+npm-debug.log*
14
+
15
+.idea/
16
+.sourcemaps/
17
+.sass-cache/
18
+.tmp/
19
+.versions/
20
+coverage/
21
+dist/
22
+node_modules/
23
+tmp/
24
+temp/
25
+hooks/
26
+platforms/
27
+plugins/
28
+plugins/android.json
29
+plugins/ios.json
30
+www/
31
+$RECYCLE.BIN/
32
+
33
+.DS_Store
34
+Thumbs.db
35
+UserInterfaceState.xcuserstate

+ 86
- 0
ionic-zipteam/config.xml 查看文件

@@ -0,0 +1,86 @@
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>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-intent href="http://*/*" />
9
+    <allow-intent href="https://*/*" />
10
+    <allow-intent href="tel:*" />
11
+    <allow-intent href="sms:*" />
12
+    <allow-intent href="mailto:*" />
13
+    <allow-intent href="geo:*" />
14
+    <preference name="ScrollEnabled" value="false" />
15
+    <preference name="android-minSdkVersion" value="16" />
16
+    <preference name="BackupWebStorage" value="none" />
17
+    <preference name="SplashMaintainAspectRatio" value="true" />
18
+    <preference name="FadeSplashScreenDuration" value="300" />
19
+    <preference name="SplashShowOnlyFirstTime" value="false" />
20
+    <preference name="SplashScreen" value="screen" />
21
+    <preference name="SplashScreenDelay" value="3000" />
22
+    <platform name="android">
23
+        <allow-intent href="market:*" />
24
+        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
25
+        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
26
+        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
27
+        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
28
+        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
29
+        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
30
+        <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
31
+        <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
32
+        <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
33
+        <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
34
+        <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
35
+        <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
36
+        <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
37
+        <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
38
+        <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
39
+        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
40
+        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
41
+        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
42
+    </platform>
43
+    <platform name="ios">
44
+        <allow-intent href="itms:*" />
45
+        <allow-intent href="itms-apps:*" />
46
+        <icon height="57" src="resources/ios/icon/icon.png" width="57" />
47
+        <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
48
+        <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
49
+        <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
50
+        <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
51
+        <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
52
+        <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
53
+        <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
54
+        <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
55
+        <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
56
+        <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
57
+        <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
58
+        <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
59
+        <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
60
+        <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
61
+        <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
62
+        <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
63
+        <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
64
+        <icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
65
+        <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
66
+        <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
67
+        <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
68
+        <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
69
+        <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
70
+        <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
71
+        <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
72
+        <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
73
+        <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
74
+        <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
75
+        <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
76
+        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
77
+        <splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
78
+    </platform>
79
+    <plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
80
+    <plugin name="cordova-plugin-device" spec="^2.0.1" />
81
+    <plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
82
+    <plugin name="cordova-plugin-ionic-webview" spec="^1.1.16" />
83
+    <plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
84
+    <engine name="ios" spec="4.5.4" />
85
+    <engine name="android" spec="~7.0.0" />
86
+</widget>

+ 8
- 0
ionic-zipteam/ionic.config.json 查看文件

@@ -0,0 +1,8 @@
1
+{
2
+  "name": "ionic-beer",
3
+  "app_id": "",
4
+  "type": "ionic-angular",
5
+  "integrations": {
6
+    "cordova": {}
7
+  }
8
+}

+ 6090
- 0
ionic-zipteam/package-lock.json
文件差异内容过多而无法显示
查看文件


+ 58
- 0
ionic-zipteam/package.json 查看文件

@@ -0,0 +1,58 @@
1
+{
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": "5.0.3",
16
+    "@angular/compiler": "5.0.3",
17
+    "@angular/compiler-cli": "5.0.3",
18
+    "@angular/core": "5.0.3",
19
+    "@angular/forms": "5.0.3",
20
+    "@angular/http": "5.0.3",
21
+    "@angular/platform-browser": "5.0.3",
22
+    "@angular/platform-browser-dynamic": "5.0.3",
23
+    "@ionic-native/core": "4.4.0",
24
+    "@ionic-native/splash-screen": "4.4.0",
25
+    "@ionic-native/status-bar": "4.4.0",
26
+    "@ionic/storage": "2.1.3",
27
+    "cordova-android": "7.0.0",
28
+    "cordova-ios": "4.5.4",
29
+    "cordova-plugin-device": "^2.0.1",
30
+    "cordova-plugin-ionic-keyboard": "^2.0.5",
31
+    "cordova-plugin-ionic-webview": "^1.1.16",
32
+    "cordova-plugin-splashscreen": "^5.0.2",
33
+    "cordova-plugin-whitelist": "^1.3.3",
34
+    "ionic-angular": "3.9.2",
35
+    "ionicons": "3.0.0",
36
+    "rxjs": "5.5.2",
37
+    "sw-toolbox": "3.6.0",
38
+    "zone.js": "0.8.18"
39
+  },
40
+  "devDependencies": {
41
+    "@ionic/app-scripts": "3.1.8",
42
+    "typescript": "2.4.2"
43
+  },
44
+  "description": "An Ionic project",
45
+  "cordova": {
46
+    "plugins": {
47
+      "cordova-plugin-whitelist": {},
48
+      "cordova-plugin-device": {},
49
+      "cordova-plugin-splashscreen": {},
50
+      "cordova-plugin-ionic-webview": {},
51
+      "cordova-plugin-ionic-keyboard": {}
52
+    },
53
+    "platforms": [
54
+      "ios",
55
+      "android"
56
+    ]
57
+  }
58
+}

+ 8
- 0
ionic-zipteam/resources/README.md 查看文件

@@ -0,0 +1,8 @@
1
+These are Cordova resources. You can replace icon.png and splash.png and run
2
+`ionic cordova resources` to generate custom icons and splash screens for your
3
+app. See `ionic cordova resources --help` for details.
4
+
5
+Cordova reference documentation:
6
+
7
+- Icons: https://cordova.apache.org/docs/en/latest/config_ref/images.html
8
+- Splash Screens: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/

二进制
ionic-zipteam/resources/android/icon/drawable-hdpi-icon.png 查看文件


二进制
ionic-zipteam/resources/android/icon/drawable-ldpi-icon.png 查看文件


二进制
ionic-zipteam/resources/android/icon/drawable-mdpi-icon.png 查看文件


二进制
ionic-zipteam/resources/android/icon/drawable-xhdpi-icon.png 查看文件


二进制
ionic-zipteam/resources/android/icon/drawable-xxhdpi-icon.png 查看文件


二进制
ionic-zipteam/resources/android/icon/drawable-xxxhdpi-icon.png 查看文件


二进制
ionic-zipteam/resources/android/splash/drawable-land-hdpi-screen.png 查看文件


二进制
ionic-zipteam/resources/android/splash/drawable-land-ldpi-screen.png 查看文件


二进制
ionic-zipteam/resources/android/splash/drawable-land-mdpi-screen.png 查看文件


二进制
ionic-zipteam/resources/android/splash/drawable-land-xhdpi-screen.png 查看文件


二进制
ionic-zipteam/resources/android/splash/drawable-land-xxhdpi-screen.png 查看文件


二进制
ionic-zipteam/resources/android/splash/drawable-land-xxxhdpi-screen.png 查看文件


二进制
ionic-zipteam/resources/android/splash/drawable-port-hdpi-screen.png 查看文件


二进制
ionic-zipteam/resources/android/splash/drawable-port-ldpi-screen.png 查看文件


二进制
ionic-zipteam/resources/android/splash/drawable-port-mdpi-screen.png 查看文件


二进制
ionic-zipteam/resources/android/splash/drawable-port-xhdpi-screen.png 查看文件


二进制
ionic-zipteam/resources/android/splash/drawable-port-xxhdpi-screen.png 查看文件


二进制
ionic-zipteam/resources/android/splash/drawable-port-xxxhdpi-screen.png 查看文件


二进制
ionic-zipteam/resources/icon.png 查看文件


二进制
ionic-zipteam/resources/ios/icon/icon-1024.png 查看文件


二进制
ionic-zipteam/resources/ios/icon/icon-40.png 查看文件


二进制
ionic-zipteam/resources/ios/icon/icon-40@2x.png 查看文件


二进制
ionic-zipteam/resources/ios/icon/icon-40@3x.png 查看文件


二进制
ionic-zipteam/resources/ios/icon/icon-50.png 查看文件


二进制
ionic-zipteam/resources/ios/icon/icon-50@2x.png 查看文件


二进制
ionic-zipteam/resources/ios/icon/icon-60.png 查看文件


二进制
ionic-zipteam/resources/ios/icon/icon-60@2x.png 查看文件


二进制
ionic-zipteam/resources/ios/icon/icon-60@3x.png 查看文件


二进制
ionic-zipteam/resources/ios/icon/icon-72.png 查看文件


二进制
ionic-zipteam/resources/ios/icon/icon-72@2x.png 查看文件


二进制
ionic-zipteam/resources/ios/icon/icon-76.png 查看文件


二进制
ionic-zipteam/resources/ios/icon/icon-76@2x.png 查看文件


二进制
ionic-zipteam/resources/ios/icon/icon-83.5@2x.png 查看文件


二进制
ionic-zipteam/resources/ios/icon/icon-small.png 查看文件


二进制
ionic-zipteam/resources/ios/icon/icon-small@2x.png 查看文件


二进制
ionic-zipteam/resources/ios/icon/icon-small@3x.png 查看文件


二进制
ionic-zipteam/resources/ios/icon/icon.png 查看文件


二进制
ionic-zipteam/resources/ios/icon/icon@2x.png 查看文件


二进制
ionic-zipteam/resources/ios/splash/Default-568h@2x~iphone.png 查看文件


二进制
ionic-zipteam/resources/ios/splash/Default-667h.png 查看文件


二进制
ionic-zipteam/resources/ios/splash/Default-736h.png 查看文件


二进制
ionic-zipteam/resources/ios/splash/Default-Landscape-736h.png 查看文件


二进制
ionic-zipteam/resources/ios/splash/Default-Landscape@2x~ipad.png 查看文件


二进制
ionic-zipteam/resources/ios/splash/Default-Landscape@~ipadpro.png 查看文件


二进制
ionic-zipteam/resources/ios/splash/Default-Landscape~ipad.png 查看文件


二进制
ionic-zipteam/resources/ios/splash/Default-Portrait@2x~ipad.png 查看文件


二进制
ionic-zipteam/resources/ios/splash/Default-Portrait@~ipadpro.png 查看文件


二进制
ionic-zipteam/resources/ios/splash/Default-Portrait~ipad.png 查看文件


二进制
ionic-zipteam/resources/ios/splash/Default@2x~iphone.png 查看文件


二进制
ionic-zipteam/resources/ios/splash/Default@2x~universal~anyany.png 查看文件


二进制
ionic-zipteam/resources/ios/splash/Default~iphone.png 查看文件


二进制
ionic-zipteam/resources/splash.png 查看文件


+ 22
- 0
ionic-zipteam/src/app/app.component.ts 查看文件

@@ -0,0 +1,22 @@
1
+import { Component } from '@angular/core';
2
+import { Platform } from 'ionic-angular';
3
+import { StatusBar } from '@ionic-native/status-bar';
4
+import { SplashScreen } from '@ionic-native/splash-screen';
5
+
6
+import { TabsPage } from '../pages/tabs/tabs';
7
+
8
+@Component({
9
+  templateUrl: 'app.html'
10
+})
11
+export class MyApp {
12
+  rootPage:any = TabsPage;
13
+
14
+  constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
15
+    platform.ready().then(() => {
16
+      // Okay, so the platform is ready and our plugins are available.
17
+      // Here you can do any higher level native things you might need.
18
+      statusBar.styleDefault();
19
+      splashScreen.hide();
20
+    });
21
+  }
22
+}

+ 1
- 0
ionic-zipteam/src/app/app.html 查看文件

@@ -0,0 +1 @@
1
+<ion-nav [root]="rootPage"></ion-nav>

+ 46
- 0
ionic-zipteam/src/app/app.module.ts 查看文件

@@ -0,0 +1,46 @@
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 { HomePage } from '../pages/home/home';
8
+import { TabsPage } from '../pages/tabs/tabs';
9
+
10
+import { StatusBar } from '@ionic-native/status-bar';
11
+import { SplashScreen } from '@ionic-native/splash-screen';
12
+
13
+import { PostPageModule } from '../pages/post/post.module';
14
+import { HttpClientModule } from '@angular/common/http';
15
+import { UserPage } from '../pages/user/user';
16
+
17
+@NgModule({
18
+  declarations: [
19
+    MyApp,
20
+    AboutPage,
21
+    UserPage,
22
+    HomePage,
23
+    TabsPage
24
+  ],
25
+  imports: [
26
+    BrowserModule,
27
+    HttpClientModule,
28
+    IonicModule.forRoot(MyApp),
29
+    PostPageModule
30
+  ],
31
+  bootstrap: [IonicApp],
32
+  entryComponents: [
33
+    MyApp,
34
+    AboutPage,
35
+    UserPage,
36
+    HomePage,
37
+    TabsPage
38
+  ],
39
+  providers: [
40
+    StatusBar,
41
+    SplashScreen,
42
+    {provide: ErrorHandler, useClass: IonicErrorHandler}
43
+  ]
44
+})
45
+
46
+export class AppModule {}

+ 16
- 0
ionic-zipteam/src/app/app.scss 查看文件

@@ -0,0 +1,16 @@
1
+// http://ionicframework.com/docs/theming/
2
+
3
+
4
+// App Global Sass
5
+// --------------------------------------------------
6
+// Put style rules here that you want to apply globally. These
7
+// styles are for the entire app and not just one component.
8
+// Additionally, this file can be also used as an entry point
9
+// to import other Sass files to be included in the output CSS.
10
+//
11
+// Shared Sass variables, which can be used to adjust Ionic's
12
+// default Sass variables, belong in "theme/variables.scss".
13
+//
14
+// To declare rules for a specific mode, create a child rule
15
+// for the .md, .ios, or .wp mode classes. The mode class is
16
+// automatically applied to the <body> element in the app.

+ 5
- 0
ionic-zipteam/src/app/main.ts 查看文件

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

二进制
ionic-zipteam/src/assets/icon/favicon.ico 查看文件


二进制
ionic-zipteam/src/assets/imgs/BardBeer.png 查看文件


二进制
ionic-zipteam/src/assets/imgs/SlackMeme.png 查看文件


二进制
ionic-zipteam/src/assets/imgs/WilderBeer.png 查看文件


二进制
ionic-zipteam/src/assets/imgs/logo.png 查看文件


+ 51
- 0
ionic-zipteam/src/index.html 查看文件

@@ -0,0 +1,51 @@
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="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
+  <script>
22
+    if ('serviceWorker' in navigator) {
23
+      navigator.serviceWorker.register('service-worker.js')
24
+        .then(() => console.log('service worker installed'))
25
+        .catch(err => console.error('Error', err));
26
+    }
27
+  </script>
28
+
29
+  <link href="build/main.css" rel="stylesheet">
30
+
31
+</head>
32
+<body>
33
+<noscript>
34
+  <h1>You must enable JavaScript to view this page.</h1>
35
+</noscript>
36
+
37
+  <!-- Ionic's root component and where the app will load -->
38
+  <ion-app></ion-app>
39
+
40
+  <!-- The polyfills js is generated during the build process -->
41
+  <script src="build/polyfills.js"></script>
42
+
43
+  <!-- The vendor js is generated during the build process
44
+       It contains all of the dependencies in node_modules -->
45
+  <script src="build/vendor.js"></script>
46
+
47
+  <!-- The main bundle js is generated during the build process -->
48
+  <script src="build/main.js"></script>
49
+
50
+</body>
51
+</html>

+ 13
- 0
ionic-zipteam/src/manifest.json 查看文件

@@ -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
+}

+ 13
- 0
ionic-zipteam/src/pages/about/about.html 查看文件

@@ -0,0 +1,13 @@
1
+<ion-header>
2
+  <ion-navbar>
3
+    <ion-title>
4
+      About ZipTeam
5
+    </ion-title>
6
+  </ion-navbar>
7
+</ion-header>
8
+
9
+<ion-content padding>
10
+  <p>When and If some students work on me, I'll be a reasonable Slack clone. (heh, heh)</p>
11
+  <p><img src="assets/imgs/SlackMeme.png"></p>
12
+
13
+</ion-content>

+ 3
- 0
ionic-zipteam/src/pages/about/about.scss 查看文件

@@ -0,0 +1,3 @@
1
+page-about {
2
+
3
+}

+ 14
- 0
ionic-zipteam/src/pages/about/about.ts 查看文件

@@ -0,0 +1,14 @@
1
+import { Component } from '@angular/core';
2
+import { NavController } from 'ionic-angular';
3
+
4
+@Component({
5
+  selector: 'page-about',
6
+  templateUrl: 'about.html'
7
+})
8
+export class AboutPage {
9
+
10
+  constructor(public navCtrl: NavController) {
11
+
12
+  }
13
+
14
+}

+ 18
- 0
ionic-zipteam/src/pages/home/home.html 查看文件

@@ -0,0 +1,18 @@
1
+<ion-header>
2
+  <ion-navbar>
3
+    <ion-title>ZipTeam</ion-title>
4
+  </ion-navbar>
5
+</ion-header>
6
+
7
+<ion-content padding>
8
+  <h2>Welcome to ZipTeam!</h2>
9
+  <p>
10
+    Posts, and nothing else. (yet)
11
+  </p>
12
+  <h3><strong>“The heavenly-harness'd team<br>
13
+    Begins his golden progress in the east.”</strong></h3>
14
+  <p>
15
+<em>Henry IV, Part I, Act III, Ccene 1.</em>
16
+  </p>
17
+  <p><img src="assets/imgs/BardBeer.png" height="240"></p>
18
+</ion-content>

+ 3
- 0
ionic-zipteam/src/pages/home/home.scss 查看文件

@@ -0,0 +1,3 @@
1
+page-home {
2
+
3
+}

+ 14
- 0
ionic-zipteam/src/pages/home/home.ts 查看文件

@@ -0,0 +1,14 @@
1
+import { Component } from '@angular/core';
2
+import { NavController } from 'ionic-angular';
3
+
4
+@Component({
5
+  selector: 'page-home',
6
+  templateUrl: 'home.html'
7
+})
8
+export class HomePage {
9
+
10
+  constructor(public navCtrl: NavController) {
11
+
12
+  }
13
+
14
+}

+ 40
- 0
ionic-zipteam/src/pages/post/post-modal.html 查看文件

@@ -0,0 +1,40 @@
1
+<ion-header>
2
+  <ion-toolbar>
3
+    <ion-title>
4
+      {{post ? 'Post Details' : 'Add Post'}}
5
+    </ion-title>
6
+    <ion-buttons start>
7
+      <button ion-button (click)="dismiss()">
8
+        <span ion-text color="primary" showWhen="ios,core">Cancel</span>
9
+        <ion-icon name="md-close" showWhen="android,windows"></ion-icon>
10
+      </button>
11
+    </ion-buttons>
12
+  </ion-toolbar>
13
+</ion-header>
14
+<ion-content padding>
15
+  <form #postForm="ngForm" (ngSubmit)="save(postForm.value)">
16
+    <input type="hidden" name="href" [(ngModel)]="post.href">
17
+    <ion-row>
18
+      <ion-col>
19
+        <ion-list inset>
20
+          <ion-item>
21
+            <ion-input placeholder="Post Message" name="name" type="text"
22
+                       required [(ngModel)]="post.text" #name></ion-input>
23
+          </ion-item>
24
+        </ion-list>
25
+      </ion-col>
26
+    </ion-row>
27
+    <ion-row>
28
+      <ion-col *ngIf="post" text-center>
29
+        <img src="{{post.giphyUrl}}">
30
+      </ion-col>
31
+    </ion-row>
32
+    <ion-row>
33
+      <ion-col>
34
+        <div *ngIf="error" class="alert alert-danger">{{error}}</div>
35
+        <button ion-button color="primary" full type="submit"
36
+                [disabled]="!postForm.form.valid">Save</button>
37
+      </ion-col>
38
+    </ion-row>
39
+  </form>
40
+</ion-content>

+ 52
- 0
ionic-zipteam/src/pages/post/post-modal.ts 查看文件

@@ -0,0 +1,52 @@
1
+import { PostService } from '../../providers/post-service';
2
+import { Component, ViewChild } from '@angular/core';
3
+import { GiphyService } from '../../providers/giphy-service';
4
+import { NavParams, ViewController, ToastController, NavController } from 'ionic-angular';
5
+import { NgForm } from '@angular/forms';
6
+
7
+@Component({
8
+  templateUrl: './post-modal.html'
9
+})
10
+export class PostModalPage {
11
+  @ViewChild('name') name;
12
+  post: any = {};
13
+  error: any;
14
+  message: any;
15
+
16
+  constructor(public PostService: PostService,
17
+              public giphyService: GiphyService,
18
+              public params: NavParams,
19
+              public viewCtrl: ViewController,
20
+              public toastCtrl: ToastController,
21
+              public navCtrl: NavController) {
22
+    if (this.params.data.id) {
23
+      this.PostService.get(this.params.get('id')).subscribe((post: any) => {
24
+        this.post = post;
25
+        this.post.href = post._links.self.href;
26
+        this.giphyService.get(post.text).subscribe(url => post.giphyUrl = url);
27
+      });
28
+    }
29
+  }
30
+
31
+  dismiss() {
32
+    this.viewCtrl.dismiss();
33
+  }
34
+
35
+  save(form: NgForm) {
36
+    let update: boolean = form['href'];
37
+    this.PostService.save(form).subscribe(result => {
38
+      let toast = this.toastCtrl.create({
39
+        message: 'Post "' + form + '" ' + ((update) ? 'updated' : 'added') + '.',
40
+        duration: 2000
41
+      });
42
+      toast.present();
43
+      this.dismiss();
44
+    }, error => this.error = error)
45
+  }
46
+
47
+  ionViewDidLoad() {
48
+    setTimeout(() => {
49
+      this.name.setFocus();
50
+    },150);
51
+  }
52
+}

+ 35
- 0
ionic-zipteam/src/pages/post/post.html 查看文件

@@ -0,0 +1,35 @@
1
+<ion-header>
2
+  <ion-navbar>
3
+    <ion-title>Public Posts</ion-title>
4
+    <!-- <ion-item>
5
+      <ion-label>Show Good Posts</ion-label>
6
+    <ion-checkbox [(ngModel)]="anonposts" (click)="changeList()"></ion-checkbox>
7
+    </ion-item> -->
8
+
9
+    <ion-buttons end>
10
+      <button ion-button icon-only (click)="openModal()" color="primary">
11
+        <ion-icon name="add-circle"></ion-icon>
12
+        <ion-icon name="list"></ion-icon>
13
+      </button>
14
+    </ion-buttons>
15
+  </ion-navbar>
16
+</ion-header>
17
+
18
+<ion-content padding>
19
+  <ion-list>
20
+    <ion-item-sliding *ngFor="let post of posts">
21
+      <ion-item (click)="openModal({id: post.id})">
22
+        <ion-avatar item-left>
23
+          <img src="{{post.giphyUrl}}">
24
+        </ion-avatar>
25
+        <h3>{{post.userid}} says:</h3>
26
+        <p><em>{{post.text}}</em></p>
27
+      </ion-item>
28
+      <ion-item-options>
29
+        <button ion-button color="danger" (click)="remove(post)">
30
+          <ion-icon name="trash"></ion-icon> Delete
31
+        </button>
32
+      </ion-item-options>
33
+    </ion-item-sliding>
34
+  </ion-list>
35
+</ion-content>

+ 24
- 0
ionic-zipteam/src/pages/post/post.module.ts 查看文件

@@ -0,0 +1,24 @@
1
+import { NgModule } from '@angular/core';
2
+import { IonicPageModule } from 'ionic-angular';
3
+import { PostPage } from './post';
4
+import { PostService } from '../../providers/post-service';
5
+import { GiphyService } from '../../providers/giphy-service';
6
+import { PostModalPage } from './post-modal';
7
+
8
+@NgModule({
9
+  declarations: [
10
+    PostPage,
11
+    PostModalPage
12
+  ],
13
+  imports: [
14
+    IonicPageModule.forChild(PostPage),
15
+  ],
16
+  providers: [
17
+    PostService,
18
+    GiphyService
19
+  ],
20
+  entryComponents: [
21
+    PostModalPage
22
+  ]
23
+})
24
+export class PostPageModule {}

+ 3
- 0
ionic-zipteam/src/pages/post/post.scss 查看文件

@@ -0,0 +1,3 @@
1
+page-post {
2
+
3
+}

+ 57
- 0
ionic-zipteam/src/pages/post/post.ts 查看文件

@@ -0,0 +1,57 @@
1
+import { Component } from '@angular/core';
2
+import { IonicPage, ModalController, NavController, NavParams, ToastController } from 'ionic-angular';
3
+import { PostService } from '../../providers/post-service';
4
+import { GiphyService } from '../../providers/giphy-service';
5
+import { PostModalPage } from './post-modal';
6
+
7
+@IonicPage()
8
+@Component({
9
+  selector: 'page-post',
10
+  templateUrl: 'post.html',
11
+})
12
+export class PostPage {
13
+  private posts: Array<any>;
14
+  public anonposts: boolean;
15
+  constructor(public navCtrl: NavController, public navParams: NavParams,
16
+              public PostService: PostService, public giphyService: GiphyService,
17
+              public modalCtrl: ModalController, public toastCtrl: ToastController) {
18
+  }
19
+
20
+  ionViewDidLoad() {
21
+    this.PostService.getAllPosts().subscribe(Posts => {
22
+      this.posts = Posts;
23
+      // console.log("posts ", Posts.length)
24
+      for (const post of this.posts) {
25
+        this.giphyService.get(post.text).subscribe(url => {
26
+          post.giphyUrl = url
27
+        });
28
+      }
29
+    })
30
+  }
31
+  changeList(event) {
32
+    this.PostService.good = this.anonposts.valueOf();
33
+    this.ionViewDidLoad();
34
+  }
35
+  openModal(PostId) {
36
+    let modal = this.modalCtrl.create(PostModalPage, PostId);
37
+    modal.present();
38
+    // refresh data after modal dismissed
39
+    modal.onDidDismiss(() => this.ionViewDidLoad())
40
+  }
41
+
42
+  remove(Post) {
43
+    this.PostService.remove(Post.id).subscribe(response => {
44
+      for (let i = 0; i < this.posts.length; i++) {
45
+        if (this.posts[i] === Post) {
46
+          this.posts.splice(i, 1);
47
+          let toast = this.toastCtrl.create({
48
+            message: 'Post "' + Post.id + '" deleted.',
49
+            duration: 2000,
50
+            position: 'top'
51
+          });
52
+          toast.present();
53
+        }
54
+      }
55
+    });
56
+  }
57
+}

+ 6
- 0
ionic-zipteam/src/pages/tabs/tabs.html 查看文件

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

+ 20
- 0
ionic-zipteam/src/pages/tabs/tabs.ts 查看文件

@@ -0,0 +1,20 @@
1
+import { Component } from '@angular/core';
2
+
3
+import { AboutPage } from '../about/about';
4
+import { UserPage } from '../user/user';
5
+import { HomePage } from '../home/home';
6
+import { PostPage } from '../post/post';
7
+
8
+@Component({
9
+  templateUrl: 'tabs.html'
10
+})
11
+export class TabsPage {
12
+  tab1Root = HomePage;
13
+  tab2Root = PostPage;
14
+  tab3Root = UserPage;
15
+  tab4Root = AboutPage;
16
+
17
+  constructor() {
18
+
19
+  }
20
+}

+ 17
- 0
ionic-zipteam/src/pages/user/user.html 查看文件

@@ -0,0 +1,17 @@
1
+<ion-header>
2
+  <ion-navbar>
3
+    <ion-title>
4
+      Users
5
+    </ion-title>
6
+  </ion-navbar>
7
+</ion-header>
8
+
9
+<ion-content>
10
+  <ion-list>
11
+    <ion-list-header>Follow us on Twitter</ion-list-header>
12
+    <ion-item>
13
+      <ion-icon name="ionic" item-start></ion-icon>
14
+      <strong>Don't call me, I'll call you!</strong> <em>- Anonymous Coward</em>
15
+    </ion-item>
16
+  </ion-list>
17
+</ion-content>

+ 3
- 0
ionic-zipteam/src/pages/user/user.scss 查看文件

@@ -0,0 +1,3 @@
1
+page-user {
2
+
3
+}

+ 14
- 0
ionic-zipteam/src/pages/user/user.ts 查看文件

@@ -0,0 +1,14 @@
1
+import { Component } from '@angular/core';
2
+import { NavController } from 'ionic-angular';
3
+
4
+@Component({
5
+  selector: 'page-user',
6
+  templateUrl: 'user.html'
7
+})
8
+export class UserPage {
9
+
10
+  constructor(public navCtrl: NavController) {
11
+
12
+  }
13
+
14
+}

+ 25
- 0
ionic-zipteam/src/providers/giphy-service.ts 查看文件

@@ -0,0 +1,25 @@
1
+import { Injectable } from '@angular/core';
2
+import { HttpClient } from '@angular/common/http';
3
+import 'rxjs/add/operator/map';
4
+
5
+@Injectable()
6
+// http://tutorials.pluralsight.com/front-end-javascript/getting-started-with-angular-2-by-building-a-giphy-search-application
7
+export class GiphyService {
8
+
9
+  // Public beta key: https://github.com/Giphy/GiphyAPI#public-beta-key
10
+  giphyApi = 'https://api.giphy.com/v1/gifs/search?api_key=dc6zaTOxFJmzC&limit=1&q=';
11
+
12
+  constructor(public http: HttpClient) {
13
+  }
14
+
15
+  get(searchTerm) {
16
+    const apiLink = this.giphyApi + searchTerm;
17
+    return this.http.get(apiLink).map((response: any) => {
18
+      if (response.data.length > 0) {
19
+        return response.data[0].images.original.url;
20
+      } else {
21
+        return 'https://media.giphy.com/media/YaOxRsmrv9IeA/giphy.gif'; // dancing cat for 404
22
+      }
23
+    });
24
+  }
25
+}

+ 46
- 0
ionic-zipteam/src/providers/post-service.ts 查看文件

@@ -0,0 +1,46 @@
1
+import { Injectable } from '@angular/core';
2
+import { Observable } from 'rxjs';
3
+import { HttpClient } from '@angular/common/http';
4
+
5
+@Injectable()
6
+export class PostService {
7
+  public API = 'http://localhost:8080';
8
+  public Post_API = this.API + '/Posts';
9
+  public good: boolean;
10
+  constructor(public http: HttpClient) {
11
+    this.good = false;
12
+  }
13
+
14
+  getGoodPosts(): Observable<any> {
15
+    return this.http.get(this.API + '/anonymousposts');
16
+  }
17
+
18
+  getAllPosts(): Observable<any> {
19
+    return this.http.get(this.API + '/posts');
20
+  }
21
+
22
+  getPosts(): Observable<any> {
23
+    if (this.good) {
24
+      return this.http.get(this.API + '/anonymousposts');
25
+    }
26
+    return this.http.get(this.API + '/posts');
27
+  }
28
+
29
+  get(id: string) {
30
+    return this.http.get(this.Post_API + '/' + id);
31
+  }
32
+
33
+  save(Post: any): Observable<any> {
34
+    let result: Observable<Object>;
35
+    if (Post['href']) {
36
+      result = this.http.put(Post.href, Post);
37
+    } else {
38
+      result = this.http.post(this.Post_API, Post)
39
+    }
40
+    return result.catch(error => Observable.throw(error));
41
+  }
42
+
43
+  remove(id: string) {
44
+    return this.http.delete(this.Post_API + '/' + id);
45
+  }
46
+}

+ 31
- 0
ionic-zipteam/src/service-worker.js 查看文件

@@ -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;

+ 88
- 0
ionic-zipteam/src/theme/variables.scss 查看文件

@@ -0,0 +1,88 @@
1
+// Ionic Variables and Theming. For more info, please see:
2
+// http://ionicframework.com/docs/theming/
3
+
4
+// Font path is used to include ionicons,
5
+// roboto, and noto sans fonts
6
+$font-path: "../assets/fonts";
7
+
8
+
9
+// The app direction is used to include
10
+// rtl styles in your app. For more info, please see:
11
+// http://ionicframework.com/docs/theming/rtl-support/
12
+$app-direction: ltr;
13
+
14
+
15
+@import "ionic.globals";
16
+
17
+
18
+// Shared Variables
19
+// --------------------------------------------------
20
+// To customize the look and feel of this app, you can override
21
+// the Sass variables found in Ionic's source scss files.
22
+// To view all the possible Ionic variables, see:
23
+// http://ionicframework.com/docs/theming/overriding-ionic-variables/
24
+
25
+
26
+
27
+
28
+// Named Color Variables
29
+// --------------------------------------------------
30
+// Named colors makes it easy to reuse colors on various components.
31
+// It's highly recommended to change the default colors
32
+// to match your app's branding. Ionic uses a Sass map of
33
+// colors so you can add, rename and remove colors as needed.
34
+// The "primary" color is the only required color in the map.
35
+
36
+$colors: (
37
+  primary:    #488aff,
38
+  secondary:  #32db64,
39
+  danger:     #f53d3d,
40
+  light:      #f4f4f4,
41
+  dark:       #222
42
+);
43
+
44
+
45
+// App iOS Variables
46
+// --------------------------------------------------
47
+// iOS only Sass variables can go here
48
+
49
+
50
+
51
+
52
+// App Material Design Variables
53
+// --------------------------------------------------
54
+// Material Design only Sass variables can go here
55
+
56
+
57
+
58
+
59
+// App Windows Variables
60
+// --------------------------------------------------
61
+// Windows only Sass variables can go here
62
+
63
+
64
+
65
+
66
+// App Theme
67
+// --------------------------------------------------
68
+// Ionic apps can have different themes applied, which can
69
+// then be future customized. This import comes last
70
+// so that the above variables are used and Ionic's
71
+// default are overridden.
72
+
73
+@import "ionic.theme.default";
74
+
75
+
76
+// Ionicons
77
+// --------------------------------------------------
78
+// The premium icon font for Ionic. For more info, please see:
79
+// http://ionicframework.com/docs/ionicons/
80
+
81
+@import "ionic.ionicons";
82
+
83
+
84
+// Fonts
85
+// --------------------------------------------------
86
+
87
+@import "roboto";
88
+@import "noto-sans";

+ 28
- 0
ionic-zipteam/tsconfig.json 查看文件

@@ -0,0 +1,28 @@
1
+{
2
+  "compilerOptions": {
3
+    "allowSyntheticDefaultImports": true,
4
+    "declaration": false,
5
+    "emitDecoratorMetadata": true,
6
+    "experimentalDecorators": true,
7
+    "lib": [
8
+      "dom",
9
+      "es2015"
10
+    ],
11
+    "module": "es2015",
12
+    "moduleResolution": "node",
13
+    "sourceMap": true,
14
+    "target": "es5"
15
+  },
16
+  "include": [
17
+    "src/**/*.ts"
18
+  ],
19
+  "exclude": [
20
+    "node_modules",
21
+    "src/**/*.spec.ts",
22
+    "src/**/__tests__/*.ts"
23
+  ],
24
+  "compileOnSave": false,
25
+  "atom": {
26
+    "rewriteTsconfig": false
27
+  }
28
+}

+ 11
- 0
ionic-zipteam/tslint.json 查看文件

@@ -0,0 +1,11 @@
1
+{
2
+  "rules": {
3
+    "no-duplicate-variable": true,
4
+    "no-unused-variable": [
5
+      true
6
+    ]
7
+  },
8
+  "rulesDirectory": [
9
+    "node_modules/tslint-eslint-rules/dist/rules"
10
+  ]
11
+}

+ 0
- 0
package-lock.json 查看文件


部分文件因为文件数量过多而无法显示