Move cursor in ion-textarea to end

Hi all!
I want to move the caret position to the end of an ion-textarea when the (focus) event is fired.
I already tried doing it with javascript but it just says that .setSelectionRange() is not a function.
Has anyone already accomplished something similar and could help me?