N
N
Nikolay Semenov2018-03-29 13:59:34
JavaScript
Nikolay Semenov, 2018-03-29 13:59:34

How to monitor block height in Angular?

Hello!
Guys, tell me how to monitor the height of the block in angular, what to pass for another indent value?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Semenov, 2018-03-29
@nickola105

querySelector

@ViewChild('block') block: ElementRef;

// ...

// querySelector
console.log(document.querySelector('div.block'));

// ViewChild
console.log(this.block.nativeElement);

<div class="block" #block>
 Текстовый блок
</div>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question