Browse Source

refactor(ng-template): move home html to home.component

pull/1565/head
mehmet-erim 7 years ago
parent
commit
57e56f768f
  1. 16
      templates/app/angular/src/app/home/home.component.html
  2. 19
      templates/app/angular/src/app/home/home.component.ts

16
templates/app/angular/src/app/home/home.component.html

@ -0,0 +1,16 @@
<div class="card">
<div class="card-header">Welcome</div>
<div class="card-body">
<p>
Welcome to the application. This is a startup project based on the ABP framework. For more information, visit
abp.io.
</p>
<p *ngIf="!hasLoggedIn">
<a routerLink="/account/login" [state]="{ redirectUrl: '/home' }" 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>

19
templates/app/angular/src/app/home/home.component.ts

@ -3,24 +3,7 @@ import { OAuthService } from 'angular-oauth2-oidc';
@Component({ @Component({
selector: 'abp-home', selector: 'abp-home',
template: ` templateUrl: './home.component.html',
<div class="card">
<div class="card-header">Welcome</div>
<div class="card-body">
<p>
Welcome to the application. This is a startup project based on the ABP framework. For more information, visit
abp.io.
</p>
<p *ngIf="!hasLoggedIn">
<a routerLink="/account/login" [state]="{ redirectUrl: '/home' }" 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>
`,
}) })
export class HomeComponent { export class HomeComponent {
get hasLoggedIn(): boolean { get hasLoggedIn(): boolean {

Loading…
Cancel
Save