[frontend] Add homepage boilerplate

This commit is contained in:
Cathy Hu 2020-07-25 22:20:17 +02:00
parent 05d4e01423
commit 5109d296bc
5 changed files with 45 additions and 2 deletions

View file

@ -3,10 +3,12 @@ import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module'; import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { SharedModule } from './shared/shared.module';
import { HomepageComponent } from './homepage/homepage.component';
@NgModule({ @NgModule({
declarations: [AppComponent], declarations: [AppComponent, HomepageComponent],
imports: [BrowserModule, AppRoutingModule], imports: [BrowserModule, AppRoutingModule, SharedModule],
providers: [], providers: [],
bootstrap: [AppComponent], bootstrap: [AppComponent],
}) })

View file

@ -0,0 +1 @@
<p>homepage works!</p>

View file

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { HomepageComponent } from './homepage.component';
describe('HomepageComponent', () => {
let component: HomepageComponent;
let fixture: ComponentFixture<HomepageComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ HomepageComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HomepageComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View file

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-homepage',
templateUrl: './homepage.component.html',
styleUrls: ['./homepage.component.scss']
})
export class HomepageComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}