邵佳豪
4 years ago
10 changed files with 82 additions and 18 deletions
@ -0,0 +1 @@
|
||||
<video autoplay controls *ngIf="data.type == 'video'" [src]="Url"></video> |
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||
|
||||
import { ViewDetailsComponent } from './view-details.component'; |
||||
|
||||
describe('ViewDetailsComponent', () => { |
||||
let component: ViewDetailsComponent; |
||||
let fixture: ComponentFixture<ViewDetailsComponent>; |
||||
|
||||
beforeEach(async(() => { |
||||
TestBed.configureTestingModule({ |
||||
declarations: [ ViewDetailsComponent ] |
||||
}) |
||||
.compileComponents(); |
||||
})); |
||||
|
||||
beforeEach(() => { |
||||
fixture = TestBed.createComponent(ViewDetailsComponent); |
||||
component = fixture.componentInstance; |
||||
fixture.detectChanges(); |
||||
}); |
||||
|
||||
it('should create', () => { |
||||
expect(component).toBeTruthy(); |
||||
}); |
||||
}); |
@ -0,0 +1,24 @@
|
||||
import { HttpClient } from '@angular/common/http'; |
||||
import { Component, Inject, OnInit } from '@angular/core'; |
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; |
||||
|
||||
@Component({ |
||||
selector: 'app-view-details', |
||||
templateUrl: './view-details.component.html', |
||||
styleUrls: ['./view-details.component.scss'] |
||||
}) |
||||
export class ViewDetailsComponent implements OnInit { |
||||
|
||||
constructor(private http: HttpClient,public dialogRef: MatDialogRef<ViewDetailsComponent>,@Inject(MAT_DIALOG_DATA) public data) {} |
||||
Url:string |
||||
onNoClick(): void { |
||||
this.dialogRef.close(); |
||||
} |
||||
ngOnInit(): void { |
||||
this.Url = '/api/Objects/PlanPlatform/' + this.data.item.objectName |
||||
} |
||||
closeDialog(){ |
||||
this.dialogRef.close(); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue