You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1002 B
30 lines
1002 B
import {NgModule} from '@angular/core';
|
|
import {RouterModule, Routes} from '@angular/router';
|
|
import {LoginComponent} from './account/login/login.component';
|
|
import {RegisterComponent} from './account/register/register.component';
|
|
import {ResetpwdComponent} from './account/resetpwd/resetpwd.component';
|
|
import {ForumComponent} from './forum/forum.component';
|
|
import {NoticeComponent} from './forum/notice/notice.component';
|
|
|
|
// 路由配置
|
|
export const routes: Routes = [
|
|
// 登陆
|
|
{path: 'login', component: LoginComponent},
|
|
// 注册
|
|
{path: 'register', component: RegisterComponent},
|
|
// 重置密码
|
|
{path: 'reset_pwd', component: ResetpwdComponent},
|
|
// 论坛管理
|
|
{path: 'forum', component: ForumComponent},
|
|
// 公告管理
|
|
{path: 'notice', component: NoticeComponent},
|
|
// 自动重定向到登陆
|
|
{path: '', redirectTo: 'login', pathMatch: 'full'}
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forRoot(routes)],
|
|
exports: [RouterModule]
|
|
})
|
|
export class AppRoutingModule {
|
|
}
|
|
|