-
-
Save uno-de-piera/b8c9d1af06eff9a9bfccc2a8d8f3eaec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Injectable() | |
export class LocalDbProvider { | |
public objDB; | |
/** | |
* | |
* @param platform | |
* @param sqlite | |
*/ | |
constructor( | |
public platform: Platform, | |
public sqlite: SQLite | |
) { | |
platform.ready().then(() => { | |
if(!this.isOpen) { | |
this.objDB = this.sqlite.create({ | |
name: 'app.db', | |
location: 'default' | |
}); | |
this.isOpen = true; | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment