@nicolaLange wrote:
I developed an App with Ionic2 Beta11 with sap-kapsel-plugins and it works.
Now i try to update to Ionic2 RC and it doesn't work.
In the old Version, I implemented the plugin like this:constructor(private platform: Platform, private menu: MenuController, private LogonPage: SMPLogon, private loadingController: LoadingController) {
this.rootPage = IntroPage;platform.ready().then(() => {
// 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();// Registrierung an der SMP LogonPage.init(this.nav, loadingController);
});
}
ionicBootstrap(MobaApp, [SMPLogon, StoreManager], {
tabsPlacement: "top"
});How should I implement it in the new Version?
I tried following, but there is an error:
"Uncaught ReferenceError: sap is not defined"
sap is an Variable, that is declared in the SMPLogon-Page and in the old Version it is filled from the sap-plugin.app.component.ts
@Component({
template:<ion-nav [root]="rootPage"></ion-nav>
})
export class MyApp {
rootPage = TabsPage;
@ViewChild(Nav) nav: Nav;constructor(platform: Platform, public LogonPage: SMPLogon) {
platform.ready().then(() => {
// 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();
LogonPage.init();
});
}
}app.module.ts:
@NgModule({
declarations: [
MyApp,
AboutPage,
ContactPage,
HomePage,
TabsPage
],
imports: [
IonicModule.forRoot(MyApp, {
tabsPlacement: "top"
})
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
AboutPage,
ContactPage,
HomePage,
TabsPage
],
providers: [SMPLogon, StoreManager]
})
export class AppModule {}
Posts: 1
Participants: 1