0225221 4 сар өмнө
parent
commit
32778e3d2c

+ 12 - 0
report-card.component.html

@@ -0,0 +1,12 @@
+<p>
+  report-card works!
+</p>
+<ion-card>
+  <ion-card-header>
+    <ion-card-title>{{report.title}}</ion-card-title>
+  </ion-card-header>
+  <ion-card-content>
+    {{report.content}}
+  </ion-card-content>
+</ion-card>
+

BIN
report-card.component.scss


+ 22 - 0
report-card.component.spec.ts

@@ -0,0 +1,22 @@
+import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
+
+import { ReportCardComponent } from './report-card.component';
+
+describe('ReportCardComponent', () => {
+  let component: ReportCardComponent;
+  let fixture: ComponentFixture<ReportCardComponent>;
+
+  beforeEach(waitForAsync(() => {
+    TestBed.configureTestingModule({
+      imports: [ReportCardComponent],
+    }).compileComponents();
+
+    fixture = TestBed.createComponent(ReportCardComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  }));
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 18 - 0
report-card.component.ts

@@ -0,0 +1,18 @@
+import { Component, Input } from '@angular/core'; 
+import { Report } from '../tab1/tab1.page';
+@Component({
+  selector: 'app-report-card',
+  templateUrl: './report-card.component.html',
+  styleUrls: ['./report-card.component.scss'],
+  standalone: true,
+})
+
+export class ReportCardComponent {
+
+  
+  @Input() report!: Report;
+  constructor() { }
+
+  ngOnInit() {}
+
+}