Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Component, OnInit } from '@angular/core';
- declare let electron: any;
- @Component({
- selector: 'app-root',
- templateUrl: './app.component.html',
- styleUrls: ['./app.component.css']
- })
- export class AppComponent implements OnInit {
- title = 'app';
- public sqlite3 = electron.remote.getGlobal('sqlite3');
- constructor () {}
- ngOnInit() {
- const me = this;
- console.log(me.sqlite3);
- const db = new me.sqlite3.Database('test.sqlite3');
- db.serialize(function() {
- db.run('CREATE TABLE lorem (info TEXT)');
- });
- }
- }
Add Comment
Please, Sign In to add comment