HTML
<span id="IDs"> hello </span>
.TS
changeID(){
// call IDs and change value
}
In TypeScript how do I change the content of id IDs
that's in my HTML inside my .TS?
HTML
<span id="IDs"> hello </span>
.TS
changeID(){
// call IDs and change value
}
In TypeScript how do I change the content of id IDs
that's in my HTML inside my .TS?
You can write basic js technically, but with type of course.
changeId() {
let element: HTMLElement = document.getElementById('id');
element.id = newId;
}
or just
changeId() {
document.getElementById('id').id = newId;
}