import { Component, Input, OnInit } from '@angular/core'; @Component({ selector: 'app-explain-textarea', templateUrl: './explain-textarea.component.html', styleUrls: ['./explain-textarea.component.scss'] }) export class ExplainTextareaComponent implements OnInit { @Input() explain:String @Input() placeholder:String @Input() index:String textcontant:string constructor() { } ngOnInit(): void { this.textcontant = localStorage.getItem(sessionStorage.getItem('companyId')+'text'+this.index) || '' } save(){ localStorage.setItem(sessionStorage.getItem('companyId')+'text'+this.index,this.textcontant) } }