You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The native element is not available inside AfterViewInit on Android but is available on ios.
For example:
import {AfterViewInit, Component} from "@angular/core";
import {Page} from "tns-core-modules/ui/page";
import {Label} from "tns-core-modules/ui/label";
@Component({
selector: "lifecycle",
moduleId: module.id,
template: `
<GridLayout columns="auto" rows="auto">
<Label id="label1" col="0" row="0"></Label>
</GridLayout>
`
})
export class Lifecycle implements AfterViewInit {
private _page: Page;
constructor(page: Page) {
this._page = page;
}
public ngAfterViewInit(): void {
let label: Label = this._page.getViewById<Label>("label1");
// label.android will be undefined on android
console.log("ngAfterViewInit: " + label.android + label.ios);
}
}
label.android will be undefined when running on android. label.ios is defined when running on ios.
I would expect EVERYTHING to be loaded and ready when ngAfterViewInit is fired. Because the view is supposed to be ready at that point.
I know you can subscribe to loaded on the element to know when it is finished loading, but i would expect AfterViewInit to be called after the entire "dom" is loaded and ready.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
The native element is not available inside AfterViewInit on Android but is available on ios.
For example:
label.android
will be undefined when running on android.label.ios
is defined when running on ios.I would expect EVERYTHING to be loaded and ready when
ngAfterViewInit
is fired. Because the view is supposed to be ready at that point.I know you can subscribe to
loaded
on the element to know when it is finished loading, but i would expectAfterViewInit
to be called after the entire "dom" is loaded and ready.The text was updated successfully, but these errors were encountered: