Skip to content

Commit

Permalink
refactor(ng-template): move home html to home.component
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmet-erim committed Jul 31, 2019
1 parent 39d3195 commit 57e56f7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
16 changes: 16 additions & 0 deletions templates/app/angular/src/app/home/home.component.html
Original file line number Diff line number Diff line change
@@ -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 changes: 1 addition & 18 deletions templates/app/angular/src/app/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,7 @@ import { OAuthService } from 'angular-oauth2-oidc';

@Component({
selector: 'abp-home',
template: `
<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>
`,
templateUrl: './home.component.html',
})
export class HomeComponent {
get hasLoggedIn(): boolean {
Expand Down

0 comments on commit 57e56f7

Please sign in to comment.