2
I have a variable called nameImage
.
It is named after a photo. Ex: photo.png
I need to remove everything after png, getting just the "photo".
I tried to:
this.formGroup.get('NomeImagem').setValue(this.nameImage)
let teste = JSON.parse(JSON.stringify(this.formGroup.get('NomeImagem')))
teste.replace("./", "")
console.log(teste);
But I get:
ERROR Typeerror: Converting circular Structure to JSON --> Starting at Object with constructor 'Subscriber' | Property '_subscriptions' -> Object with constructor 'Array' | index 0 -> Object with constructor 'Subjectsubscription'
If I try without the json.parse(JSON.stringify(...
it informs that it is not possible to apply replace to the test variable
this.formGroup.get('Image name'). value
– Eduardo Vargas