添加菜单页路由

This commit is contained in:
zhouyuejun
2018-10-29 16:27:34 +08:00
parent bec3bb9137
commit b2dc055a3d
58 changed files with 769 additions and 8 deletions
@@ -0,0 +1,18 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HistoricalDataComponent } from './historical-data.component';
const historicalDataRoutes: Routes = [
{
path: '',
component: HistoricalDataComponent
}
]
@NgModule({
imports: [RouterModule.forChild(historicalDataRoutes)],
exports: [RouterModule]
})
export class HistoricalDataRouting { }
@@ -0,0 +1,3 @@
<p>
historical-data works!
</p>
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { HistoricalDataComponent } from './historical-data.component';
describe('HistoricalDataComponent', () => {
let component: HistoricalDataComponent;
let fixture: ComponentFixture<HistoricalDataComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ HistoricalDataComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HistoricalDataComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-historical-data',
templateUrl: './historical-data.component.html',
styleUrls: ['./historical-data.component.scss']
})
export class HistoricalDataComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
@@ -0,0 +1,13 @@
import { HistoricalDataModule } from './historical-data.module';
describe('HistoricalDataModule', () => {
let historicalDataModule: HistoricalDataModule;
beforeEach(() => {
historicalDataModule = new HistoricalDataModule();
});
it('should create an instance', () => {
expect(historicalDataModule).toBeTruthy();
});
});
@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { HistoricalDataComponent } from './historical-data.component';
import { HistoricalDataRouting } from './historical-data-routing.module';
@NgModule({
imports: [
CommonModule,
HistoricalDataRouting
],
declarations: [HistoricalDataComponent]
})
export class HistoricalDataModule { }