I'm a Ionic v1 developer and since the launch of Ionic 2 I've started to be excited with the features and performance. But the TS approach is not my side. I decided to learn Angular 2 following the ES methods and everything ok. But trying to move Ionic TS to ES manually (seeing that the --no-ts option is no more available), some bugs started to appear on my console, breaking all the ES method. I need help from some Ionic 2/Angular 2 and transpiler specialists to develop this solution (for me and for the ES lovers).
The error that appears in console is:
Uncaught Error: Can't resolve all parameters for provideLocationStrategy: (PlatformLocation, ?, Config).
at CompileMetadataResolver._getDependenciesMetadata (http://127.0.0.1:8080/lib/lib.js:47002:21)
at CompileMetadataResolver._getFactoryMetadata (http://127.0.0.1:8080/lib/lib.js:46907:28)
at CompileMetadataResolver.getProviderMetadata (http://127.0.0.1:8080/lib/lib.js:47097:45)
at http://127.0.0.1:8080/lib/lib.js:47042:47
at Array.forEach (native)
at CompileMetadataResolver._getProvidersMetadata (http://127.0.0.1:8080/lib/lib.js:47026:21)
at http://127.0.0.1:8080/lib/lib.js:46736:65
at Array.forEach (native)
at CompileMetadataResolver._loadNgModuleMetadata (http://127.0.0.1:8080/lib/lib.js:46727:51)
at CompileMetadataResolver.loadNgModuleMetadata (http://127.0.0.1:8080/lib/lib.js:46692:31)
The supposed code that fires the bug:
(function (app) {
app.AppModule =
ng.core.NgModule({
imports: [
ionicBundle.IonicModule.forRoot(app.MyApp)
],
declarations: [
app.MyApp,
app.AboutPage,
app.ContactPage,
app.HomePage,
app.TabsPage
],
bootstrap: [ionicBundle.IonicApp],
entryComponents: [
app.MyApp,
app.AboutPage,
app.ContactPage,
app.HomePage,
app.TabsPage
]
})
.Class({
constructor: function AppModule () {}
});
})(window.app || (window.app = {}));
Here is my repo with the project.