app.module.ts 1.45 KB
import { NgModule }      from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouterModule, Routes } from '@angular/router';
import {HttpModule} from '@angular/http';
import { FormsModule }   from '@angular/forms';

import { AppComponent }  from './app.component';
import {SiteMenuComponent} from './shared/site-menu.component';
import {SiteFooterComponent} from './shared/site-footer.component';
import {LoginComponent} from './pages/login.component';
import {UpdatePasswordComponent} from './pages/update-password.component';
import { DashboardComponent } from './pages/dashboard.component';
import { UpdateAdminProfileComponent } from './pages/admin-update-profile.component';

const appRoutes: Routes = [
    { path: '', component: DashboardComponent },
    { path: 'dashboard', redirectTo: '', pathMatch: 'full' },
    //{ path: 'login', component: LoginComponent },
    //{ path: 'login/:slug', component: LoginComponent }
    { path: 'admin-update-prodile', component: UpdateAdminProfileComponent }
];


@NgModule({
    imports: [
        BrowserModule,
        HttpModule,
        RouterModule.forRoot(appRoutes),
        FormsModule
    ],
    declarations: [
        AppComponent,
        SiteMenuComponent,
        SiteFooterComponent,
        DashboardComponent,
        //LoginComponent,
        UpdatePasswordComponent,
        UpdateAdminProfileComponent
        ],
    bootstrap:    [ AppComponent ]
})
export class AppModule { }