I am using angular4. I want to customize the login page in the ngx-admin. Is there any solution? Or it is good to create a new login page in ngx-admin instead of customizing the existing one.
I am using angular4. I want to customize the login page in the ngx-admin. Is there any solution? Or it is good to create a new login page in ngx-admin instead of customizing the existing one.
In order to use customize login page you just have to do following steps.
Note:
I have created login component inside pages folder.
Version
Your global Angular CLI version (8.3.9) is greater than your local version (8.0.2). The local Angular CLI version is used.
Step#1
Replace route component with your component name like this inside app-routing.module.ts
path: 'auth',
component: NbAuthComponent,
children: [
{
path: '',
component: LoginComponent,
},
{
path: 'login',
component: LoginComponent,
},
Step#2
Import component in theme.modules.ts
located inside /src/app/@theme
import {LoginComponent} from '../../app/pages/login/login.component'
const COMPONENTS = [
HeaderComponent,
FooterComponent,
SearchInputComponent,
TinyMCEComponent,
OneColumnLayoutComponent,
ThreeColumnsLayoutComponent,
TwoColumnsLayoutComponent,
LoginComponent // HERE
];
Step#3
Put component inside declaration of pages.module.ts
declarations: [
PagesComponent,
LoginComponent,
],
Results
I will recommend you to use Ngx-admin existing login page because it is very easy to customize. You can simply set it by setting the endpoint and you can also modify the existing by copying the source code from ngx-admin documentation.