Fixed links to Add Transaction and Edit Account

This commit is contained in:
Tom Bloor 2017-08-16 15:48:42 +01:00
parent e1d44c52ae
commit cec88d1cb5
3 changed files with 22 additions and 3 deletions

View file

@ -1,10 +1,13 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { ChartsModule } from 'ng2-charts/ng2-charts'; import { ChartsModule } from 'ng2-charts/ng2-charts';
import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
import { DashboardComponent } from './dashboard.component'; import { DashboardComponent } from './dashboard.component';
import { LeaderboardsComponent } from './leaderboards.component'; import { LeaderboardsComponent } from './leaderboards.component';
import { AccountEditComponent } from './account-edit.component';
import { AddDataComponent } from './add-data.component';
import { DashboardRoutingModule } from './dashboard.routing'; import { DashboardRoutingModule } from './dashboard.routing';
@ -13,11 +16,15 @@ import { DashboardRoutingModule } from './dashboard.routing';
DashboardRoutingModule, DashboardRoutingModule,
ChartsModule, ChartsModule,
BsDropdownModule, BsDropdownModule,
CommonModule CommonModule,
FormsModule,
ReactiveFormsModule,
], ],
declarations: [ declarations: [
DashboardComponent, DashboardComponent,
LeaderboardsComponent, LeaderboardsComponent,
AccountEditComponent,
AddDataComponent,
] ]
}) })
export class DashboardModule { } export class DashboardModule { }

View file

@ -5,6 +5,8 @@ import { AuthGuard } from '../_guards/auth.guard';
import { DashboardComponent } from './dashboard.component'; import { DashboardComponent } from './dashboard.component';
import { LeaderboardsComponent } from './leaderboards.component'; import { LeaderboardsComponent } from './leaderboards.component';
import { FullLayoutComponent } from '../layouts/full-layout.component'; import { FullLayoutComponent } from '../layouts/full-layout.component';
import { AccountEditComponent } from './account-edit.component';
import { AddDataComponent } from './add-data.component';
// Using child path to allow for FullLayout theming // Using child path to allow for FullLayout theming
const routes: Routes = [ const routes: Routes = [
@ -22,6 +24,16 @@ const routes: Routes = [
path: 'leaderboards', path: 'leaderboards',
component: LeaderboardsComponent, component: LeaderboardsComponent,
data: { title: 'Leaderboards' }, data: { title: 'Leaderboards' },
},
{
path: 'account-edit',
component: AccountEditComponent,
data: { title: 'Leaderboards' },
},
{
path: 'add-data',
component: AddDataComponent,
data: { title: 'Add Transaction' },
} }
], ],
} }

View file

@ -11,7 +11,7 @@
<div class="dropdown-header text-center"><strong>Settings</strong></div> <div class="dropdown-header text-center"><strong>Settings</strong></div>
<a class="dropdown-item" routerLinkActive="active" [routerLink]="['/components/account-edit']"> <a class="dropdown-item" routerLinkActive="active" [routerLink]="['/account-edit']">
<i class="fa fa-user"></i> Account Settings <i class="fa fa-user"></i> Account Settings
</a> </a>
<div class="divider"></div> <div class="divider"></div>
@ -36,7 +36,7 @@
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" routerLinkActive="active" [routerLink]="['/components/add-data']"> <a class="nav-link" routerLinkActive="active" [routerLink]="['/add-data']">
<i class="icon-list"></i> Add Transaction <i class="icon-list"></i> Add Transaction
</a> </a>
</li> </li>