How to customize login?

Viewed 14928

I am using . I want to customize the login page in the . Is there any solution? Or it is good to create a new login page in instead of customizing the existing one.

3 Answers

In order to use customize login page you just have to do following steps.

Note:

I have created login component inside pages folder.

enter image description here

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

enter image description here

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.

Related