This commit is contained in:
insanity 2018-01-31 12:56:16 +09:00
commit b547fa9337
53 changed files with 69 additions and 14 deletions

View 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();
}));
});

View File

@ -0,0 +1,27 @@
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) => {
}
});
}
}

View File

@ -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({

View File

@ -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({

View File

@ -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: [

View File

@ -0,0 +1,10 @@
export class Member {
id: number;
email: string;
password: string;
name: string;
phone: string;
companyName: string;
createDate: Date;
status: string;
}

View File

@ -5,4 +5,7 @@ export class MemberService {
constructor() { } constructor() { }
signin(email: string, password: string) {
}
} }

View File

@ -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: [

View File

@ -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({

View File

@ -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({

View File

@ -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 = [
{ {