angular-formio
Version:
The Form.io dynamic form and data management system for Angular.
31 lines (29 loc) • 834 B
text/typescript
import { Routes } from '@angular/router';
import { FormioAuthRouteConfig } from './auth.config';
import { FormioAuthComponent } from './auth.component';
import { FormioAuthLoginComponent } from './login.component';
import { FormioAuthRegisterComponent } from './register.component';
export function FormioAuthRoutes(config?: FormioAuthRouteConfig): Routes {
config = config || {};
return [
{
path: '',
component: config.auth || FormioAuthComponent,
children: [
{
path: '',
redirectTo: 'login',
pathMatch: 'full'
},
{
path: 'login',
component: config.login || FormioAuthLoginComponent
},
{
path: 'register',
component: config.register || FormioAuthRegisterComponent
}
]
}
];
};