function capitilize(str = '') {
const words = str.split(' ');
const capitilized = words.map(word => {
const letters = word.split('');
letters[0] = letters[0].toUpperCase();
return letters.join('');
});
return capitilized.join(' ');
}
const necessarySpan = document.querySelector('div.your-class > span');
document.removeChild(necessarySpan);
<ng-content></ng-content>
const link = document.querySelector('.link');
link.addEventListener('click', e => {
e.preventDefault();
const inputs = document.querySelectorAll('.data');
inputs.forEach(input => {
if (input.value == '') {
input.style.border = '2px solid red';
} else {
input.style.border = '2px solid green';
}
})
})