添加菜单页路由
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { BasicDataComponent } from './basic-data.component';
|
||||
|
||||
const basicDataRoutes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: BasicDataComponent
|
||||
}
|
||||
]
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(basicDataRoutes)],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
|
||||
export class BasicDataRouting { }
|
||||
@@ -0,0 +1,3 @@
|
||||
<p>
|
||||
basic-data works!
|
||||
</p>
|
||||
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { BasicDataComponent } from './basic-data.component';
|
||||
|
||||
describe('BasicDataComponent', () => {
|
||||
let component: BasicDataComponent;
|
||||
let fixture: ComponentFixture<BasicDataComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ BasicDataComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(BasicDataComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-basic-data',
|
||||
templateUrl: './basic-data.component.html',
|
||||
styleUrls: ['./basic-data.component.scss']
|
||||
})
|
||||
export class BasicDataComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import { BasicDataModule } from './basic-data.module';
|
||||
|
||||
describe('BasicDataModule', () => {
|
||||
let basicDataModule: BasicDataModule;
|
||||
|
||||
beforeEach(() => {
|
||||
basicDataModule = new BasicDataModule();
|
||||
});
|
||||
|
||||
it('should create an instance', () => {
|
||||
expect(basicDataModule).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,13 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { BasicDataComponent } from './basic-data.component';
|
||||
import { BasicDataRouting } from './basic-data-routing.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
BasicDataRouting
|
||||
],
|
||||
declarations: [BasicDataComponent]
|
||||
})
|
||||
export class BasicDataModule { }
|
||||
Reference in New Issue
Block a user