How can I add the Content
provider to my App?
If I register the provider in a specific component it works fine, but when I register it in the ionicBootstrap I get the following error:
EXCEPTION: No provider for ElementRef! (Content → ElementRef)
here is my App.ts:
import {Component} from "@angular/core";
import {ionicBootstrap, Platform, Content} from "ionic-angular";
import {StatusBar} from "ionic-native";
import {BackendService} from "./backend/backend.service";
import {LoginComponent} from "./pages/login/login.component";
@Component({
template: "<ion-nav [root]='rootPage'></ion-nav>"
})
export class App {
// We tell our app which is the first page (main, root, or wahtever you like to call it...)
private rootPage: any = LoginComponent;
constructor(private platform: Platform) {
this.initializeApp();
}
private initializeApp() {
this.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();
});
}
}
ionicBootstrap(App, [BackendService, Content], {});