Add a new Angular app with 4 components
This commit is contained in:
49
Front/skydivelogs-app/src/app/app.module.ts
Normal file
49
Front/skydivelogs-app/src/app/app.module.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { SummaryComponent } from './summary/summary.component';
|
||||
import { ListOfJumpsComponent } from './list-of-jumps/list-of-jumps.component';
|
||||
import { ListOfDzsComponent } from './list-of-dzs/list-of-dzs.component';
|
||||
import { NewJumpComponent } from './new-jump/new-jump.component';
|
||||
|
||||
|
||||
const appRoutes: Routes = [
|
||||
{ path: 'summary', component: SummaryComponent },
|
||||
{ path: 'jumpsList', component: ListOfJumpsComponent },
|
||||
{ path: 'dz', component: ListOfDzsComponent },
|
||||
{ path: 'newjump', component: NewJumpComponent }
|
||||
// { path: 'hero/:id', component: HeroDetailComponent },
|
||||
// {
|
||||
// path: 'heroes',
|
||||
// component: HeroListComponent,
|
||||
// data: { title: 'Heroes List' }
|
||||
// },
|
||||
// { path: '',
|
||||
// redirectTo: '/heroes',
|
||||
// pathMatch: 'full'
|
||||
// },
|
||||
// { path: '**', component: PageNotFoundComponent }
|
||||
];
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent,
|
||||
SummaryComponent,
|
||||
ListOfJumpsComponent,
|
||||
ListOfDzsComponent,
|
||||
NewJumpComponent
|
||||
],
|
||||
imports: [
|
||||
RouterModule.forRoot(
|
||||
appRoutes,
|
||||
{ enableTracing: true } // <-- debugging purposes only
|
||||
),
|
||||
BrowserModule
|
||||
],
|
||||
providers: [],
|
||||
bootstrap: [AppComponent]
|
||||
})
|
||||
export class AppModule { }
|
||||
Reference in New Issue
Block a user