我找不到sql server library(cordova-plugin-sqlserver) [英] I can not find sql server library (cordova-plugin-sqlserver)

查看:133
本文介绍了我找不到sql server library(cordova-plugin-sqlserver)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在以下地址安装了cordova-plugin-sqlserver库。
https://www.npmjs.com/package/cordova-plugin- sqlserver

I installed the cordova-plugin-sqlserver library in the following address. https://www.npmjs.com/package/cordova-plugin-sqlserver

但我不知道如何将其导入项目。

But I do not know how to import it into the project.

例如。

import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { BaglantiProvider } from '../../providers/baglanti/baglanti';
import { SqlServer } from 'what shall i write ???????? ';
@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {
  constructor(public navCtrl: NavController, public baglanti : BaglantiProvider) {
  }
  test(){
    SqlServer.init("192.168.0.120", "SQLEXPRESS", "sa", "01234567", "dinademo", function(event) {
    alert(JSON.stringify(event));
    }, function(error) {
      alert(JSON.stringify(error));
    });
  }
}

推荐答案

从代码内部引用它的正确方法是:

the correct way to reference it from inside the code is:

(< any> window).SqlServer

这篇关于我找不到sql server library(cordova-plugin-sqlserver)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆