We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
Thanks for these useful mocks.
Could you add in the main README an explanation about how we can disable mock in production mode ?
//AOT trick let checkDevMode = false; if (isDevMode()) { checkDevMode = true; } const CameraConfiguration = (checkDevMode) ? { provide: Camera, useClass: CameraMock } : Camera; providers: [ ..., CameraConfiguration, ... ]
The text was updated successfully, but these errors were encountered:
I think this approach is better. You don't have to change it every time you build your app:
const isBrowser = document.URL.includes(‘https://’) || document.URL.includes(‘http://’);/*document.URL.startsWith(‘http’);
and then a bit lower in the provides :
(isBrowser ? {provide : Camera, useClass : CameraMock} : Camera), (isBrowser ? {provide : ImagePicker, useClass : ImagePickerMock} : ImagePicker), (isBrowser ? {provide : Geolocation, useClass : GeolocationMock} : Geolocation),
Sorry, something went wrong.
Thanks. I will add this to the Read Me shortly.
Your approach doesnt work i logged this and it always returned true . and ionic seems to be running in the localhost in a mobile device
No branches or pull requests
Hi,
Thanks for these useful mocks.
Could you add in the main README an explanation about how we can disable mock in production mode ?
The text was updated successfully, but these errors were encountered: