Skip to content

Commit

Permalink
refactor(AboutComponent): Convert to standalone (#1780)
Browse files Browse the repository at this point in the history
  • Loading branch information
hirokiterashima authored May 8, 2024
1 parent ec5e89d commit 6cef3aa
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 42 deletions.
11 changes: 0 additions & 11 deletions src/app/about/about-routing.module.ts

This file was deleted.

7 changes: 1 addition & 6 deletions src/app/about/about.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';

import { AboutComponent } from './about.component';

describe('AboutComponent', () => {
Expand All @@ -9,12 +7,9 @@ describe('AboutComponent', () => {

beforeEach(() => {
TestBed.configureTestingModule({
declarations: [AboutComponent],
schemas: [NO_ERRORS_SCHEMA]
imports: [AboutComponent]
}).compileComponents();
});

beforeEach(() => {
fixture = TestBed.createComponent(AboutComponent);
component = fixture.componentInstance;
fixture.detectChanges();
Expand Down
18 changes: 10 additions & 8 deletions src/app/about/about.component.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { Component, OnInit } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Component } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';

@Component({
imports: [CommonModule, FlexLayoutModule, MatButtonModule, MatIconModule],
selector: 'app-about',
templateUrl: './about.component.html',
styleUrls: ['./about.component.scss']
standalone: true,
styleUrl: './about.component.scss',
templateUrl: './about.component.html'
})
export class AboutComponent implements OnInit {
constructor() {}

ngOnInit() {}
}
export class AboutComponent {}
15 changes: 0 additions & 15 deletions src/app/about/about.module.ts

This file was deleted.

6 changes: 4 additions & 2 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ import { HTTP_INTERCEPTORS, HttpRequest, HttpHandler, HttpInterceptor } from '@a
import { Injectable, NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { FormsModule } from '@angular/forms';

import { PrivacyComponent } from './privacy/privacy.component';

const routes: Routes = [
{ path: '', loadChildren: () => import('./home/home.module').then((m) => m.HomeModule) },
{ path: 'about', loadChildren: () => import('./about/about.module').then((m) => m.AboutModule) },
{
path: 'about',
loadComponent: () => import('./about/about.component').then((m) => m.AboutComponent)
},
{
path: 'contact',
loadChildren: () => import('./contact/contact.module').then((m) => m.ContactModule)
Expand Down

0 comments on commit 6cef3aa

Please sign in to comment.