So, how to get some element offset by ID in Angular 2?
Done this:
scrollToBottom () {
let content = document.getElementById('content')
let offsetTop = content.getBoundingClientRect().top
console.log(content, offsetTop)
}
But I got this error:
Object is possibly 'null'