Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Black screen when using Angular/Nativescript #2

Open
justussigma opened this issue Dec 6, 2023 · 1 comment
Open

Black screen when using Angular/Nativescript #2

justussigma opened this issue Dec 6, 2023 · 1 comment

Comments

@justussigma
Copy link

HI!

I am new to nativescript and angular so bear with me. I have followed the instructions to implement this component in Angular Nativescript:

  • ns plugin add @nativescript-community/ui-cameraview (in the root folder)

Then I have this in my view.component.ts:
import { registerElement } from '@nativescript/angular'; ------> this because 'nativescript-angular/element-registry' didnt work
import { CameraView } from '@nativescript-community/ui-cameraview';
registerElement('CameraView', () => CameraView);

and this in my view.component.html:

<FlexboxLayout
flexDirection="column"
justifyContent="space-around"
alignItems="center"


I only get a blackscreen... How can use the functions inside the CameraView component to get a camera view on the screen?

@justussigma
Copy link
Author

UPDATE: If I call:
constructor() {
requestCameraPermissions().then(() => {
});
}

this gives me the view if i restart the app after allowing the app use the camera but how can I actually use the functions ofthe CameraView component?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant