Add a new Angular app with 4 components

This commit is contained in:
Sébastien André
2019-09-17 13:48:16 +02:00
parent d9a79ebe0f
commit e79ac82861
47 changed files with 13521 additions and 0 deletions

View 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 { }