ing
This commit is contained in:
parent
75223ac370
commit
d360a150da
15
src/app/commons/api/service/api.service.spec.ts
Normal file
15
src/app/commons/api/service/api.service.spec.ts
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
import { TestBed, inject } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { APIService } from './api.service';
|
||||||
|
|
||||||
|
describe('APIService', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
providers: [APIService]
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be created', inject([APIService], (service: APIService) => {
|
||||||
|
expect(service).toBeTruthy();
|
||||||
|
}));
|
||||||
|
});
|
25
src/app/commons/api/service/api.service.ts
Normal file
25
src/app/commons/api/service/api.service.ts
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
import { Observer } from 'rxjs/Observer';
|
||||||
|
import { Subject } from 'rxjs/Subject';
|
||||||
|
import { Subscription } from 'rxjs/Subscription';
|
||||||
|
import { WebSocketSubject } from 'rxjs/observable/dom/WebSocketSubject';
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class APIService {
|
||||||
|
private socketSubject: WebSocketSubject<Object>;
|
||||||
|
private socket: Subscription;
|
||||||
|
private apiURL: string;
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
public connect(): void {
|
||||||
|
this.socketSubject = WebSocketSubject.create(this.apiURL);
|
||||||
|
this.socketSubject.subscribe({
|
||||||
|
next: (data: MessageEvent) => {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
import { SettingComponent } from './components/setting/setting.component';
|
import { SettingComponent } from './component/setting/setting.component';
|
||||||
import { MaterialModule } from 'app/commons/ui/material/material.module';
|
import { MaterialModule } from 'app/commons/ui/material/material.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
import { MapComponent } from './components/map/map.component';
|
import { MapComponent } from './component/map/map.component';
|
||||||
import { MaterialModule } from 'app/commons/ui/material/material.module';
|
import { MaterialModule } from 'app/commons/ui/material/material.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { ModifyModule } from 'app/packages/member/components/modify/modify.module';
|
import { ModifyModule } from 'app/packages/member/component/modify/modify.module';
|
||||||
import { SigninModule } from 'app/packages/member/components/signin/signin.module';
|
import { SigninModule } from 'app/packages/member/component/signin/signin.module';
|
||||||
import { SignupModule } from 'app/packages/member/components/signup/signup.module';
|
import { SignupModule } from 'app/packages/member/component/signup/signup.module';
|
||||||
import { ResetPasswordModule } from 'app/packages/member/components/reset-password/reset-password.module';
|
import { ResetPasswordModule } from 'app/packages/member/component/reset-password/reset-password.module';
|
||||||
import { MemberService } from 'app/packages/member/services/member.service';
|
import { MemberService } from 'app/packages/member/service/member.service';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
|
10
src/app/packages/member/model/member.ts
Normal file
10
src/app/packages/member/model/member.ts
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
export class Member {
|
||||||
|
id: number;
|
||||||
|
email: string;
|
||||||
|
password: string;
|
||||||
|
name: string;
|
||||||
|
phone: string;
|
||||||
|
companyName: string;
|
||||||
|
createDate: Date;
|
||||||
|
status: string;
|
||||||
|
}
|
|
@ -5,4 +5,7 @@ export class MemberService {
|
||||||
|
|
||||||
constructor() { }
|
constructor() { }
|
||||||
|
|
||||||
|
signin(email: string, password: string) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { ListComponent } from 'app/packages/noauth/components/list/list.component';
|
import { ListComponent } from 'app/packages/noauth/component/list/list.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { ListComponent } from 'app/packages/probe/components/list/list.component';
|
import { ListComponent } from 'app/packages/probe/component/list/list.component';
|
||||||
import { DownloadComponent } from 'app/packages/probe/components/download/download.component';
|
import { DownloadComponent } from 'app/packages/probe/component/download/download.component';
|
||||||
import { MaterialModule } from 'app/commons/ui/material/material.module';
|
import { MaterialModule } from 'app/commons/ui/material/material.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { SigninPageRoutingModule } from './signin-page-routing.module';
|
import { SigninPageRoutingModule } from './signin-page-routing.module';
|
||||||
import { SigninPageComponent } from './signin-page.component';
|
import { SigninPageComponent } from './signin-page.component';
|
||||||
import { SigninModule } from 'app/packages/member/components/signin/signin.module';
|
import { SigninModule } from 'app/packages/member/component/signin/signin.module';
|
||||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { Routes, RouterModule } from '@angular/router';
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
import { ProbesPageComponent } from './probes-page.component';
|
import { ProbesPageComponent } from './probes-page.component';
|
||||||
import { ListComponent as ProbeListComponent } from 'app/packages/probe/components/list/list.component';
|
import { ListComponent as ProbeListComponent } from 'app/packages/probe/component/list/list.component';
|
||||||
import { ListComponent as NoauthListComponent } from 'app/packages/noauth/components/list/list.component';
|
import { ListComponent as NoauthListComponent } from 'app/packages/noauth/component/list/list.component';
|
||||||
import { DownloadComponent } from 'app/packages/probe/components/download/download.component';
|
import { DownloadComponent } from 'app/packages/probe/component/download/download.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user