After upgrading an angular nativescript project to the current versions of angular, typescript, tns, etc.. I'm getting a runtime error stating:
TypeError: Cannot set property 'actionBarHidden' of null at new AppComponent...
The code that previously worked to hide the action bar looks like this:
import {Page} from "tns-core-modules/ui/page";
export class AppComponent implements OnInit, AfterViewInit {
constructor(page: Page) {
page.actionBarHidden = true;
}
}
Why is page null after the injection?