Browse Source

fix(module-template): organize home page #2265

pull/2293/head
mehmet-erim 7 years ago
parent
commit
1b54da232f
  1. 26
      templates/module/angular/src/app/app-routing.module.ts
  2. 19
      templates/module/angular/src/app/home/home.component.html
  3. 2
      templates/module/angular/src/app/home/home.component.ts

26
templates/module/angular/src/app/app-routing.module.ts

@ -8,31 +8,39 @@ const routes: Routes = [
loadChildren: () => import('./home/home.module').then(m => m.HomeModule),
data: {
routes: {
name: '::Menu:Home',
name: 'Home',
order: 1,
} as ABP.Route,
},
},
{
path: 'identity',
loadChildren: () => import('./lazy-libs/identity-wrapper.module').then(m => m.IdentityWrapperModule),
path: 'account',
loadChildren: () =>
import('./lazy-libs/account-wrapper.module').then(m => m.AccountWrapperModule),
},
{
path: 'tenant-management',
path: 'identity',
loadChildren: () =>
import('./lazy-libs/tenant-management-wrapper.module').then(m => m.TenantManagementWrapperModule),
import('./lazy-libs/identity-wrapper.module').then(m => m.IdentityWrapperModule),
},
{
path: 'account',
loadChildren: () => import('./lazy-libs/account-wrapper.module').then(m => m.AccountWrapperModule),
path: 'tenant-management',
loadChildren: () =>
import('./lazy-libs/tenant-management-wrapper.module').then(
m => m.TenantManagementWrapperModule,
),
},
{
path: 'setting-management',
loadChildren: () =>
import('./lazy-libs/setting-management-wrapper.module').then(m => m.SettingManagementWrapperModule),
import('./lazy-libs/setting-management-wrapper.module').then(
m => m.SettingManagementWrapperModule,
),
},
{
path: 'my-project-name',
loadChildren: () => import('./lazy-libs/my-project-name-wrapper.module').then(m => m.MyProjectNameWrapperModule),
loadChildren: () =>
import('./lazy-libs/my-project-name-wrapper.module').then(m => m.MyProjectNameWrapperModule),
},
];

19
templates/module/angular/src/app/home/home.component.html

@ -1,15 +1,6 @@
<div class="card">
<div class="card-header">{{ '::Welcome' | abpLocalization }}</div>
<div class="card-body">
<p>
{{ '::LongWelcomeMessage' | abpLocalization }}
</p>
<p *ngIf="!hasLoggedIn">
<a routerLink="/account/login" [state]="{ redirectUrl: '/' }" class="btn btn-primary" role="button"
><i class="fa fa-sign-in"></i>{{ 'AbpIdentity::Login' | abpLocalization }}</a
>
</p>
<hr />
<p class="text-right"><a href="https://abp.io?ref=tmpl" target="_blank">abp.io</a></p>
</div>
<div id="AbpContentToolbar"></div>
<div class="row">
<a routerLink="/account/login" [state]="{ redirectUrl: '/' }" role="button">
{{ '::Login' | abpLocalization }}</a
>
</div>

2
templates/module/angular/src/app/home/home.component.ts

@ -2,7 +2,7 @@ import { Component } from '@angular/core';
import { OAuthService } from 'angular-oauth2-oidc';
@Component({
selector: 'abp-home',
selector: 'app-home',
templateUrl: './home.component.html',
})
export class HomeComponent {

Loading…
Cancel
Save