import { Component, OnInit,Input } from '@angular/core'; @Component({ selector: 'app-get-out-of-line-details', templateUrl: './get-out-of-line-details.component.html', styleUrls: ['./get-out-of-line-details.component.scss'] }) export class GetOutOfLineDetailsComponent implements OnInit { @Input() data:any constructor() { } imgUrl:string vedioUrl:string ngOnInit(): void { this.data.type = 1 this.imgUrl = this.data.violateImage this.vedioUrl = this.data.violateVideo } selectedType:string = 'img' contentType(type){ this.selectedType = type } }