diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 0297262..8d72890 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,10 +1,58 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; +import { HomeComponent } from './components/home/home.component'; +import { LoginComponent } from './components/login/login.component'; +import { NotFoundComponent } from './components/not-found/not-found.component'; -const routes: Routes = []; +const routes: Routes = [ + { + path:"login", + component:LoginComponent + }, + { + path:"", + component:HomeComponent + // children: [ + // { + // path:"intro", + // component:IntroductionComponent + // }, + // { + // path:"sign", + // component:SignatureComponent + // }, + // { + // path:"signCMS", + // component:SignatureCmsComponent + // }, + // { + // path:"logs", + // component:LogComponent + // }, + // { + // path:"status", + // component:DeviceComponent + // } + // ], + // canActivate: [ProfileService], + // canActivateChild: [ProfileService] + }, + { + path:"not-found", + component:NotFoundComponent + }, + { + path:"**", + redirectTo:'/not-found' + } +]; @NgModule({ - imports: [RouterModule.forRoot(routes)], - exports: [RouterModule] + imports: [ + RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' }) + ], + exports: [ + RouterModule + ] }) export class AppRoutingModule { } diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 5c20967..71db51b 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,20 +1,80 @@ import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; +import { HttpClientModule, HttpClientXsrfModule, HTTP_INTERCEPTORS } from '@angular/common/http'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { RouterModule } from '@angular/router'; + +import { MatToolbarModule } from '@angular/material/toolbar'; +import { MatSidenavModule } from '@angular/material/sidenav'; +import { MatButtonModule } from '@angular/material/button'; +import { MatIconModule } from '@angular/material/icon'; +import { MatDividerModule } from '@angular/material/divider'; +import { MatDialogModule } from '@angular/material/dialog'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatInputModule } from '@angular/material/input'; +import { MatCardModule } from '@angular/material/card'; +import { MatPaginatorModule } from '@angular/material/paginator'; +import { MatSortModule } from '@angular/material/sort'; +import { MatTableModule } from "@angular/material/table"; +import { MatSelectModule } from '@angular/material/select'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { FlexLayoutModule } from '@angular/flex-layout'; +import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; +import { MatStepperModule } from '@angular/material/stepper'; +import { MatListModule } from '@angular/material/list'; +import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; +import { MatProgressBarModule } from '@angular/material/progress-bar'; +import { ToastrModule } from 'ngx-toastr'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; -import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { LoginComponent } from './components/login/login.component'; +import { NotFoundComponent } from './components/not-found/not-found.component'; +import { HomeComponent } from './components/home/home.component'; +import { NavbarComponent } from './components/home/navbar/navbar.component'; +import { WorkspaceComponent } from './components/home/workspace/workspace.component'; @NgModule({ - declarations: [ - AppComponent - ], - imports: [ - BrowserModule, - AppRoutingModule, - BrowserAnimationsModule - ], - providers: [], - bootstrap: [AppComponent] + declarations: [ + AppComponent, + LoginComponent, + NotFoundComponent, + HomeComponent, + NavbarComponent, + WorkspaceComponent + ], + imports: [ + BrowserModule, + AppRoutingModule, + BrowserAnimationsModule, + HttpClientModule, + FormsModule, + ReactiveFormsModule, + MatToolbarModule, + MatSidenavModule, + MatIconModule, + MatDividerModule, + MatDialogModule, + MatFormFieldModule, + MatInputModule, + MatButtonModule, + MatCardModule, + MatPaginatorModule, + MatSortModule, + MatTableModule, + MatSelectModule, + MatCheckboxModule, + MatListModule, + MatProgressSpinnerModule, + MatProgressBarModule, + MatStepperModule, + FlexLayoutModule, + RouterModule, + FontAwesomeModule, + ToastrModule.forRoot() + ], + providers: [], + bootstrap: [AppComponent] }) export class AppModule { } diff --git a/src/app/components/home/home.component.css b/src/app/components/home/home.component.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/components/home/home.component.html b/src/app/components/home/home.component.html new file mode 100644 index 0000000..5f2c53f --- /dev/null +++ b/src/app/components/home/home.component.html @@ -0,0 +1 @@ +

home works!

diff --git a/src/app/components/home/home.component.spec.ts b/src/app/components/home/home.component.spec.ts new file mode 100644 index 0000000..2c5a172 --- /dev/null +++ b/src/app/components/home/home.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HomeComponent } from './home.component'; + +describe('HomeComponent', () => { + let component: HomeComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ HomeComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(HomeComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/home/home.component.ts b/src/app/components/home/home.component.ts new file mode 100644 index 0000000..007fef0 --- /dev/null +++ b/src/app/components/home/home.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-home', + templateUrl: './home.component.html', + styleUrls: ['./home.component.css'] +}) +export class HomeComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/components/home/navbar/navbar.component.css b/src/app/components/home/navbar/navbar.component.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/components/home/navbar/navbar.component.html b/src/app/components/home/navbar/navbar.component.html new file mode 100644 index 0000000..6bbf8ee --- /dev/null +++ b/src/app/components/home/navbar/navbar.component.html @@ -0,0 +1 @@ +

navbar works!

diff --git a/src/app/components/home/navbar/navbar.component.spec.ts b/src/app/components/home/navbar/navbar.component.spec.ts new file mode 100644 index 0000000..f8ccd6f --- /dev/null +++ b/src/app/components/home/navbar/navbar.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NavbarComponent } from './navbar.component'; + +describe('NavbarComponent', () => { + let component: NavbarComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ NavbarComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(NavbarComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/home/navbar/navbar.component.ts b/src/app/components/home/navbar/navbar.component.ts new file mode 100644 index 0000000..18d7b70 --- /dev/null +++ b/src/app/components/home/navbar/navbar.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-navbar', + templateUrl: './navbar.component.html', + styleUrls: ['./navbar.component.css'] +}) +export class NavbarComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/components/home/workspace/workspace.component.css b/src/app/components/home/workspace/workspace.component.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/components/home/workspace/workspace.component.html b/src/app/components/home/workspace/workspace.component.html new file mode 100644 index 0000000..3071832 --- /dev/null +++ b/src/app/components/home/workspace/workspace.component.html @@ -0,0 +1 @@ +

workspace works!

diff --git a/src/app/components/home/workspace/workspace.component.spec.ts b/src/app/components/home/workspace/workspace.component.spec.ts new file mode 100644 index 0000000..c0c0c01 --- /dev/null +++ b/src/app/components/home/workspace/workspace.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { WorkspaceComponent } from './workspace.component'; + +describe('WorkspaceComponent', () => { + let component: WorkspaceComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ WorkspaceComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(WorkspaceComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/home/workspace/workspace.component.ts b/src/app/components/home/workspace/workspace.component.ts new file mode 100644 index 0000000..fe55049 --- /dev/null +++ b/src/app/components/home/workspace/workspace.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-workspace', + templateUrl: './workspace.component.html', + styleUrls: ['./workspace.component.css'] +}) +export class WorkspaceComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/components/login/login.component.css b/src/app/components/login/login.component.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/components/login/login.component.html b/src/app/components/login/login.component.html new file mode 100644 index 0000000..147cfc4 --- /dev/null +++ b/src/app/components/login/login.component.html @@ -0,0 +1 @@ +

login works!

diff --git a/src/app/components/login/login.component.spec.ts b/src/app/components/login/login.component.spec.ts new file mode 100644 index 0000000..d2c0e6c --- /dev/null +++ b/src/app/components/login/login.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { LoginComponent } from './login.component'; + +describe('LoginComponent', () => { + let component: LoginComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ LoginComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(LoginComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/login/login.component.ts b/src/app/components/login/login.component.ts new file mode 100644 index 0000000..4f58421 --- /dev/null +++ b/src/app/components/login/login.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-login', + templateUrl: './login.component.html', + styleUrls: ['./login.component.css'] +}) +export class LoginComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/components/not-found/not-found.component.css b/src/app/components/not-found/not-found.component.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/components/not-found/not-found.component.html b/src/app/components/not-found/not-found.component.html new file mode 100644 index 0000000..8071020 --- /dev/null +++ b/src/app/components/not-found/not-found.component.html @@ -0,0 +1 @@ +

not-found works!

diff --git a/src/app/components/not-found/not-found.component.spec.ts b/src/app/components/not-found/not-found.component.spec.ts new file mode 100644 index 0000000..9d41c99 --- /dev/null +++ b/src/app/components/not-found/not-found.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NotFoundComponent } from './not-found.component'; + +describe('NotFoundComponent', () => { + let component: NotFoundComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ NotFoundComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(NotFoundComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/not-found/not-found.component.ts b/src/app/components/not-found/not-found.component.ts new file mode 100644 index 0000000..33da0a4 --- /dev/null +++ b/src/app/components/not-found/not-found.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-not-found', + templateUrl: './not-found.component.html', + styleUrls: ['./not-found.component.css'] +}) +export class NotFoundComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/services/backend/backend.service.spec.ts b/src/app/services/backend/backend.service.spec.ts new file mode 100644 index 0000000..bd90d07 --- /dev/null +++ b/src/app/services/backend/backend.service.spec.ts @@ -0,0 +1,16 @@ +import { TestBed } from '@angular/core/testing'; + +import { BackendService } from './backend.service'; + +describe('BackendService', () => { + let service: BackendService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(BackendService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); +}); diff --git a/src/app/services/backend/backend.service.ts b/src/app/services/backend/backend.service.ts new file mode 100644 index 0000000..d4097d3 --- /dev/null +++ b/src/app/services/backend/backend.service.ts @@ -0,0 +1,9 @@ +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root' +}) +export class BackendService { + + constructor() { } +}