I'm encountering an issue with my SQLiteMock provider not being recognized. I'm using "{ provide: SQLite, useClass: SQLiteMock }" in Ionic 3, but the SQLiteMock class is not being used instead of SQLite as expected. I have to manually specify the use of SQLiteMock in Techdao.ts. What could be missing or going wrong?
app.module.ts
import { NgModule, ErrorHandler } from '@angular/core';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { StatusBar, Splashscreen } from 'ionic-native';
import { SQLite, SQLiteDatabaseConfig } from '@ionic-native/sqlite';
import { MyApp } from './app.component';
import { BrowserModule } from '@angular/platform-browser';
import { HttpModule } from '@angular/http';
import { Page1 } from '../pages/page1/page1';
declare var SQL;
// Code for SQLiteMock and SQLiteObject classes...
@NgModule({
declarations: [
MyApp,
Page1
],
imports: [
BrowserModule,
HttpModule,
IonicModule.forRoot(MyApp)
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
Page1
],
providers: [
StatusBar,
Splashscreen,
{ provide: SQLite, useClass: SQLiteMock },
{ provide: ErrorHandler, useClass: IonicErrorHandler }
]
})
export class AppModule { }
app.component.ts
// Code for app.component.ts...techdao.ts
// Code for techdao.ts...