Skip to content

Commit

Permalink
refactor: page title を page component に移動
Browse files Browse the repository at this point in the history
  • Loading branch information
kasaharu committed Feb 12, 2024
1 parent 7bfed66 commit 9990885
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/app/features/top/containers/top/top.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<app-page-title [title]="name"></app-page-title>

<div class="contents">
<img src="assets/images/profile.jpg" width="200" height="200" alt="" />

Expand Down
5 changes: 2 additions & 3 deletions src/app/features/top/containers/top/top.component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { NgFor } from '@angular/common';
import { snsList } from '../../data/sns';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { ExternalLinkDirective } from '../../../../shared/external-link/directives/external-link.directive';
import { PageTitleComponent } from '../../../../shared/page-title/page-title/page-title.component';
import { snsList } from '../../data/sns';

@Component({
selector: 'app-top',
Expand All @@ -13,7 +13,6 @@ import { PageTitleComponent } from '../../../../shared/page-title/page-title/pag
imports: [PageTitleComponent, NgFor, ExternalLinkDirective],
})
export class TopComponent {
readonly name = 'kasaharu (Wataru KASAHARA)';
readonly myInfoList: string[] = ['Web Frontend Engineer', 'Angular Japan User Group Staff'];
readonly snsList = snsList;
}
12 changes: 9 additions & 3 deletions src/app/features/top/top.component.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { PageTitleComponent } from '../../shared/page-title/page-title/page-title.component';
import { TopComponent } from './containers/top/top.component';

@Component({
template: '<app-top></app-top>',
template: `
<app-page-title [title]="name"></app-page-title>
<app-top></app-top>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [TopComponent],
imports: [TopComponent, PageTitleComponent],
})
export class TopPageComponent {}
export class TopPageComponent {
readonly name = 'kasaharu (Wataru KASAHARA)';
}

0 comments on commit 9990885

Please sign in to comment.