I’ve updated my ionic app from beta 11 to rc0. I am trying to use a custom component that I’m calling from the home-page.html
<slider-component [songs]="recentlyViewedSongs" [viewId]="RecentViewId" </slider-component>
In the slider-component.ts, I have a console.log which remains always undefined
export class SliderComponent {
@Input() songs: any;
@Input() viewId: any = []; //stores id of songs to be shown
constructor(
public nav: NavController,
) {
console.log("In the SliderComponent, this.songs", this.songs); //shows an empty array
}
In my app.module.ts, I’m using @NgModule like this
@NgModule({
declarations: [
MyApp,
HomePage,
SliderComponent
],
imports: [
IonicModule.forRoot(MyApp)
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
HomePage,
SliderComponent
],
providers: []
})
export class AppModule {}
Any ideas on what I’m doing wrong?