Allison Ziegler 6 年之前
父節點
當前提交
e8142f3a28
共有 3 個文件被更改,包括 25 次插入5 次删除
  1. 3
    4
      zlg/ionic.config.json
  2. 3
    1
      zlg/src/app/app.module.ts
  3. 19
    0
      zlg/src/providers/user/user.ts

+ 3
- 4
zlg/ionic.config.json 查看文件

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

+ 3
- 1
zlg/src/app/app.module.ts 查看文件

15
 import { Signup } from '../pages/signup/signup'
15
 import { Signup } from '../pages/signup/signup'
16
 import { HomePage } from '../pages/home/home';
16
 import { HomePage } from '../pages/home/home';
17
 import { WebsocketProvider } from '../providers/websocket/websocket';
17
 import { WebsocketProvider } from '../providers/websocket/websocket';
18
+import { UserProvider } from '../providers/user/user';
18
 
19
 
19
 @NgModule({
20
 @NgModule({
20
   declarations: [
21
   declarations: [
41
     StatusBar,
42
     StatusBar,
42
     SplashScreen,
43
     SplashScreen,
43
     {provide: ErrorHandler, useClass: IonicErrorHandler},
44
     {provide: ErrorHandler, useClass: IonicErrorHandler},
44
-    WebsocketProvider
45
+    WebsocketProvider,
46
+    UserProvider
45
   ]
47
   ]
46
 })
48
 })
47
 export class AppModule {}
49
 export class AppModule {}

+ 19
- 0
zlg/src/providers/user/user.ts 查看文件

1
+import { HttpClient } from '@angular/common/http';
2
+import { Injectable } from '@angular/core';
3
+
4
+/*
5
+  Generated class for the UserProvider provider.
6
+
7
+  See https://angular.io/guide/dependency-injection for more info on providers
8
+  and Angular DI.
9
+*/
10
+@Injectable()
11
+export class UserProvider {
12
+
13
+  constructor(public http: HttpClient) {
14
+    console.log('Hello UserProvider Provider');
15
+  }
16
+
17
+  
18
+
19
+}