我尝试了下面的导入,但没有运气 //从@ ion-native / appsee';
导入{Appsee}另外,我看到你必须声明有问题的变量来识别变量,我就像下面这样做了
声明var cordova:any;
@Component({
templateUrl: 'app.html'
})
export class MyApp {
rootPage:any = LoginPage; // FOR TESTING
constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
platform.ready().then(() => {
Appsee.start("my key");
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
statusBar.styleDefault();
splashScreen.hide();
});
}
}
我还尝试添加公共appsee:Appsee到构造函数但仍然没有运气。
感谢任何指导。我收到 ReferenceError:未定义cordova。
如何导入自定义插件appsee
编辑添加建议的代码 声明var Appsee:any;
{{1}}
答案 0 :(得分:0)
您只需将其放在imports
下,如下所示。
//your other imports here
declare var Appsee:any;
@Component({
templateUrl: 'app.html'
})
export class MyApp {
@ViewChild(Nav) nav: Nav;