Я пытаюсь удалить код jQuery и реализовать следующие коды, как показано ниже: -
$('.abc').hide();
$('.abc').show();
В angular5 как: -
(<any>document.getElementsByClassName('abc'))[0]['style'].display = 'none';
(<any>document.getElementsByClassName('abc'))[0]['style'].display = 'block';
Ошибка при получении: -
ERROR TypeError: Cannot read property 'style' of undefined at ContaComponent.loadComponent
However, jQuery code is working fine but I want to remove jQuery dependency as above but getting error.