ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'getFragmentManager' of undefined. This error is popping when I run my nativescript angular application. It says something wrong in my account.component.ts. Why this error is occurs and how to fix this issue?
Give any solution for this issue.
ts file:
ngOnInit(){
if (isAndroid) {
const dialogFragment = application.android.foregroundActivity.getFragmentManager().findFragmentByTag("dialog");
if (dialogFragment) {
utils.ad.dismissSoftInput(dialogFragment.getDialog().getCurrentFocus());
} else {
utils.ad.dismissSoftInput();
}
}
}
Is seems your problem is discussed here: https://github.com/NativeScript/NativeScript/issues/5307