import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule, Routes } from '@angular/router';
import {AskComponent} from './ask/ask.component';
import {AskdetailComponent} from './askdetail/askdetail.component';
import {PageTwoComponent} from './page-two/page-two.component';
import {PageThreeComponent} from './page-three/page-three.component';
const routes: Routes = [
  {
    path: '', redirectTo: '/index', pathMatch: 'full'
  },
  {path: 'index', component: AskComponent},
  {path: 'askdetail/:id',component: AskdetailComponent },
  {path:'pageTwo',component:PageTwoComponent},
  {path:'pageThree',component:PageThreeComponent}

];
@NgModule({
  declarations: [],
  imports: [
    CommonModule,
    RouterModule.forRoot(routes)
  ],
  exports:[
    RouterModule
  ]
})
export class AppRoutingModule { }
