<a name="3.0.0-beta8>
Angular 4.x support for AOT
<a name="3.0.0-beta7>
- BREAKING CHANGE:
WpApiModule.initializeApp
is nowWpApiModule.forRoot
Follow the following docs to migrate to the new way to bootstrap your module:
An exported function instead WpApiLoaderFactory
is mandatory to be used with AoT compilation or Ionic 2.
import { Http } from '@angular/http';
import {
WpApiModule
WpApiLoader,
WpApiStaticLoader
} from 'wp-api-angular'
export function WpApiLoaderFactory(http: Http) {
return new WpApiStaticLoader(http, 'http://YOUR_DOMAIN/wp-json/', /* namespace is optional, default: '/wp/v2' */);
}
@NgModule({
imports: [
BrowserModule,
WpApiModule.forRoot({
provide: WpApiLoader,
useFactory: (WpApiLoaderFactory),
deps: [Http]
})
],
bootstrap: [App]
})
export class AppModule { }
<a name="3.0.0-beta6>
export missing tokens to fix aot in ionic cli
Fix config and http injection #20
Add AOT support for GOOD this time! #19
Add AOT support #19
Remove d.ts
extensions #15
Upgrade to Angular 2.0.0 / NgModules
Making sure it is usable via TypeScript as well (export d.ts files).
Adding peer dependencies
First version for ng2.