Explorar o código

上传文件至 ''

0225221 hai 4 meses
pai
achega
32778e3d2c
Modificáronse 4 ficheiros con 52 adicións e 0 borrados
  1. 12 0
      report-card.component.html
  2. BIN=BIN
      report-card.component.scss
  3. 22 0
      report-card.component.spec.ts
  4. 18 0
      report-card.component.ts

+ 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=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() {}
+
+}