Skip to content

Commit

Permalink
feat(详情页): 添加详情页模块,基础详情页组件,高级详情页组件
Browse files Browse the repository at this point in the history
  • Loading branch information
jiayisheji committed Nov 7, 2017
1 parent fbf5bce commit fffe395
Show file tree
Hide file tree
Showing 10 changed files with 126 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/pages/profile/advanced/advanced.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p>
advanced works!
</p>
Empty file.
25 changes: 25 additions & 0 deletions src/app/pages/profile/advanced/advanced.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { AdvancedComponent } from './advanced.component';

describe('AdvancedComponent', () => {
let component: AdvancedComponent;
let fixture: ComponentFixture<AdvancedComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AdvancedComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(AdvancedComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
15 changes: 15 additions & 0 deletions src/app/pages/profile/advanced/advanced.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-advanced',
templateUrl: './advanced.component.html',
styleUrls: ['./advanced.component.scss']
})
export class AdvancedComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}
3 changes: 3 additions & 0 deletions src/app/pages/profile/basic/basic.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p>
basic works!
</p>
Empty file.
25 changes: 25 additions & 0 deletions src/app/pages/profile/basic/basic.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { BasicComponent } from './basic.component';

describe('BasicComponent', () => {
let component: BasicComponent;
let fixture: ComponentFixture<BasicComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ BasicComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(BasicComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
15 changes: 15 additions & 0 deletions src/app/pages/profile/basic/basic.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-basic',
templateUrl: './basic.component.html',
styleUrls: ['./basic.component.scss']
})
export class BasicComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}
25 changes: 25 additions & 0 deletions src/app/pages/profile/profile-routing.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { BasicComponent } from './basic/basic.component';
import { AdvancedComponent } from './advanced/advanced.component';
const routes: Routes = [
{
path: '',
redirectTo: '/profile/basic',
pathMatch: 'full'
},
{
path: 'basic',
component: BasicComponent
},
{
path: 'advanced',
component: AdvancedComponent
}
];

@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class ProfileRoutingModule { }
15 changes: 15 additions & 0 deletions src/app/pages/profile/profile.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { ProfileRoutingModule } from './profile-routing.module';
import { BasicComponent } from './basic/basic.component';
import { AdvancedComponent } from './advanced/advanced.component';

@NgModule({
imports: [
CommonModule,
ProfileRoutingModule
],
declarations: [BasicComponent, AdvancedComponent]
})
export class ProfileModule { }

0 comments on commit fffe395

Please sign in to comment.