-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(表单页): 添加表单页模块,基础表单组件,分步表单组件,高级表单组件
- Loading branch information
1 parent
ee2db7e
commit e7cdb85
Showing
14 changed files
with
176 additions
and
0 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
src/app/pages/form/advanced-form/advanced-form.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<p> | ||
advanced-form works! | ||
</p> |
Empty file.
25 changes: 25 additions & 0 deletions
25
src/app/pages/form/advanced-form/advanced-form.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { AdvancedFormComponent } from './advanced-form.component'; | ||
|
||
describe('AdvancedFormComponent', () => { | ||
let component: AdvancedFormComponent; | ||
let fixture: ComponentFixture<AdvancedFormComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ AdvancedFormComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(AdvancedFormComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
15 changes: 15 additions & 0 deletions
15
src/app/pages/form/advanced-form/advanced-form.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-advanced-form', | ||
templateUrl: './advanced-form.component.html', | ||
styleUrls: ['./advanced-form.component.scss'] | ||
}) | ||
export class AdvancedFormComponent implements OnInit { | ||
|
||
constructor() { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<p> | ||
basic-form works! | ||
</p> |
Empty file.
25 changes: 25 additions & 0 deletions
25
src/app/pages/form/basic-form/basic-form.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { BasicFormComponent } from './basic-form.component'; | ||
|
||
describe('BasicFormComponent', () => { | ||
let component: BasicFormComponent; | ||
let fixture: ComponentFixture<BasicFormComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ BasicFormComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(BasicFormComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-basic-form', | ||
templateUrl: './basic-form.component.html', | ||
styleUrls: ['./basic-form.component.scss'] | ||
}) | ||
export class BasicFormComponent implements OnInit { | ||
|
||
constructor() { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { Routes, RouterModule } from '@angular/router'; | ||
|
||
import { BasicFormComponent } from './basic-form/basic-form.component'; | ||
import { StepFormComponent } from './step-form/step-form.component'; | ||
import { AdvancedFormComponent } from './advanced-form/advanced-form.component'; | ||
const routes: Routes = [ | ||
{ | ||
path: '', | ||
redirectTo: '/form/basic-form', | ||
pathMatch: 'full' | ||
}, | ||
{ | ||
path: 'basic-form', | ||
component: BasicFormComponent | ||
}, | ||
{ | ||
path: 'step-form', | ||
component: StepFormComponent | ||
}, | ||
{ | ||
path: 'advanced-form', | ||
component: AdvancedFormComponent | ||
} | ||
]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forChild(routes)], | ||
exports: [RouterModule] | ||
}) | ||
export class FormRoutingModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { SharedModule } from '../../shared'; | ||
|
||
import { FormRoutingModule } from './form-routing.module'; | ||
import { BasicFormComponent } from './basic-form/basic-form.component'; | ||
import { StepFormComponent } from './step-form/step-form.component'; | ||
import { AdvancedFormComponent } from './advanced-form/advanced-form.component'; | ||
|
||
@NgModule({ | ||
imports: [ | ||
SharedModule, | ||
FormRoutingModule | ||
], | ||
declarations: [BasicFormComponent, StepFormComponent, AdvancedFormComponent] | ||
}) | ||
export class FormModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<p> | ||
step-form works! | ||
</p> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { StepFormComponent } from './step-form.component'; | ||
|
||
describe('StepFormComponent', () => { | ||
let component: StepFormComponent; | ||
let fixture: ComponentFixture<StepFormComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ StepFormComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(StepFormComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-step-form', | ||
templateUrl: './step-form.component.html', | ||
styleUrls: ['./step-form.component.scss'] | ||
}) | ||
export class StepFormComponent implements OnInit { | ||
|
||
constructor() { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
} |