2
This commit is contained in:
11
src/app/components/main-view/main-view.component.html
Normal file
11
src/app/components/main-view/main-view.component.html
Normal file
@ -0,0 +1,11 @@
|
||||
<div class="container">
|
||||
<div class="row mt-3"><h1>TV-Serien</h1></div>
|
||||
<div class="row mt-1">
|
||||
<div class="col-md-7 mb-3">
|
||||
<app-show-list [shows]="shows"></app-show-list>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
</div>
|
||||
<app-show-form></app-show-form>
|
||||
</div>
|
||||
</div>
|
23
src/app/components/main-view/main-view.component.spec.ts
Normal file
23
src/app/components/main-view/main-view.component.spec.ts
Normal file
@ -0,0 +1,23 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { MainViewComponent } from './main-view.component';
|
||||
|
||||
describe('MainViewComponent', () => {
|
||||
let component: MainViewComponent;
|
||||
let fixture: ComponentFixture<MainViewComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [MainViewComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(MainViewComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
24
src/app/components/main-view/main-view.component.ts
Normal file
24
src/app/components/main-view/main-view.component.ts
Normal file
@ -0,0 +1,24 @@
|
||||
import {Component, inject} from '@angular/core';
|
||||
import {ShowListComponent} from '../show-list/show-list.component';
|
||||
import {Show} from '../../model/show';
|
||||
import {ShowService} from '../../services/show.service';
|
||||
import {ShowFormComponent} from '../show-form/show-form.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-main-view',
|
||||
standalone: true,
|
||||
imports: [
|
||||
ShowListComponent,
|
||||
ShowFormComponent
|
||||
],
|
||||
templateUrl: './main-view.component.html',
|
||||
styleUrl: './main-view.component.css'
|
||||
})
|
||||
export class MainViewComponent {
|
||||
private dataService: ShowService = inject(ShowService);
|
||||
public shows: Show[] = [];
|
||||
|
||||
constructor() {
|
||||
this.shows = this.dataService.getShows();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user