Dot android is null when back to page


#1

I want to change native property for some element on nativescript/angular like this :

scroller.android.setHorizontalScrollBarEnabled(false);

It worked inside onInit.but I lost ‘dot android’ part When back to this page with routeExtensionl.back() and console show this error if I want force scroller to remove scrollbar(in observable way):

ERROR TypeError: Cannot read property ‘setHorizontalScrollBarEnabled’ of null