Trying to import the ionicBootstrap to get ng2-translator working and following the docs here: https://ionicframework.com/docs/v2/resources/ng2-translate/. However whenever I tried to import ionicBootstrap it does not recognize the module, saying ‘module has not exported member ionicBootstrap’.
I am importing it like this into my app.ts component.
import {ionicBootstrap} from 'ionic-angular'; // Throws error
I am on the current version of ionic 2:
"ionic-angular": "^2.0.0-rc.0"
I also tried porting and creating new ionic 2 projects and could not get ionicBootstrap imported. Has anyone else had this problem? Thanks in advance.
My NgModule complains about format when I do it that way, or does it need to be in the IonicModule.forRoot(MyApp, import here)? If I do it the latter way, I get an error saying no Provider for TranslateLoader.
But to be clear, adding a provider and using ionicBootstrap are two different things, correct? If I use a provider, it is for that component, hence, instantiated each time that component is instantiated. If It uses ionicBootstrap, the service doesn’t reload per component loaded, it persists through the entire application.
“Which of these two you choose can matter a great deal. If you add it to the bootstrap then a single instance of the service will be created that all components in the application will share – making it a great way to share data between components. If you add the provider to an individual component, then a new instance will be created for just that one component.”