mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-01-27 03:36:09 +01:00
first commit
This commit is contained in:
parent
06776d15c4
commit
bd8eba9de1
15 changed files with 30470 additions and 480 deletions
1
src/app/pages/login/login.component.html
Normal file
1
src/app/pages/login/login.component.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<p>login works!</p>
|
||||
0
src/app/pages/login/login.component.scss
Normal file
0
src/app/pages/login/login.component.scss
Normal file
27
src/app/pages/login/login.component.ts
Normal file
27
src/app/pages/login/login.component.ts
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import { Component } from '@angular/core';
|
||||
import { AngularFireAuth } from '@angular/fire/compat/auth';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-login',
|
||||
templateUrl: './login.component.html',
|
||||
styleUrls: ['./login.component.scss']
|
||||
})
|
||||
export class LoginComponent {
|
||||
email: string = '';
|
||||
password: string = '';
|
||||
errorMessage: string = '';
|
||||
|
||||
constructor(private afAuth: AngularFireAuth, private router: Router) {}
|
||||
|
||||
async login() {
|
||||
try {
|
||||
const userCredential = await this.afAuth.signInWithEmailAndPassword(this.email, this.password);
|
||||
// If login successful, navigate to the home page or any other desired route
|
||||
this.router.navigate(['/home']);
|
||||
} catch (error) {
|
||||
// Handle authentication errors
|
||||
this.errorMessage = error.message;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,15 +2,11 @@ import { NbMenuItem } from '@nebular/theme';
|
|||
|
||||
export const MENU_ITEMS: NbMenuItem[] = [
|
||||
{
|
||||
title: 'E-commerce',
|
||||
icon: 'shopping-cart-outline',
|
||||
title: 'Home',
|
||||
icon: 'home-outline',
|
||||
link: '/pages/dashboard',
|
||||
home: true,
|
||||
},
|
||||
{
|
||||
title: 'IoT Dashboard',
|
||||
icon: 'home-outline',
|
||||
link: '/pages/iot-dashboard',
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
title: 'FEATURES',
|
||||
|
|
@ -144,74 +140,7 @@ export const MENU_ITEMS: NbMenuItem[] = [
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'Maps',
|
||||
icon: 'map-outline',
|
||||
children: [
|
||||
{
|
||||
title: 'Google Maps',
|
||||
link: '/pages/maps/gmaps',
|
||||
},
|
||||
{
|
||||
title: 'Leaflet Maps',
|
||||
link: '/pages/maps/leaflet',
|
||||
},
|
||||
{
|
||||
title: 'Bubble Maps',
|
||||
link: '/pages/maps/bubble',
|
||||
},
|
||||
{
|
||||
title: 'Search Maps',
|
||||
link: '/pages/maps/searchmap',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'Charts',
|
||||
icon: 'pie-chart-outline',
|
||||
children: [
|
||||
{
|
||||
title: 'Echarts',
|
||||
link: '/pages/charts/echarts',
|
||||
},
|
||||
{
|
||||
title: 'Charts.js',
|
||||
link: '/pages/charts/chartjs',
|
||||
},
|
||||
{
|
||||
title: 'D3',
|
||||
link: '/pages/charts/d3',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'Editors',
|
||||
icon: 'text-outline',
|
||||
children: [
|
||||
{
|
||||
title: 'TinyMCE',
|
||||
link: '/pages/editors/tinymce',
|
||||
},
|
||||
{
|
||||
title: 'CKEditor',
|
||||
link: '/pages/editors/ckeditor',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'Tables & Data',
|
||||
icon: 'grid-outline',
|
||||
children: [
|
||||
{
|
||||
title: 'Smart Table',
|
||||
link: '/pages/tables/smart-table',
|
||||
},
|
||||
{
|
||||
title: 'Tree Grid',
|
||||
link: '/pages/tables/tree-grid',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
title: 'Miscellaneous',
|
||||
icon: 'shuffle-2-outline',
|
||||
|
|
@ -234,14 +163,7 @@ export const MENU_ITEMS: NbMenuItem[] = [
|
|||
title: 'Register',
|
||||
link: '/auth/register',
|
||||
},
|
||||
{
|
||||
title: 'Request Password',
|
||||
link: '/auth/request-password',
|
||||
},
|
||||
{
|
||||
title: 'Reset Password',
|
||||
link: '/auth/reset-password',
|
||||
},
|
||||
|
||||
],
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import { DashboardModule } from './dashboard/dashboard.module';
|
|||
import { ECommerceModule } from './e-commerce/e-commerce.module';
|
||||
import { PagesRoutingModule } from './pages-routing.module';
|
||||
import { MiscellaneousModule } from './miscellaneous/miscellaneous.module';
|
||||
import { LoginComponent } from './login/login.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
|
@ -19,6 +20,7 @@ import { MiscellaneousModule } from './miscellaneous/miscellaneous.module';
|
|||
],
|
||||
declarations: [
|
||||
PagesComponent,
|
||||
LoginComponent,
|
||||
],
|
||||
})
|
||||
export class PagesModule {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue