Heres my info:
Cordova CLI: 6.5.0
Ionic Framework Version: 3.0.1
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.3.0
ios-deploy version: 1.9.1
ios-sim version: 5.0.13
OS: macOS Sierra
Node Version: v7.9.0
Xcode version: Xcode 8.3 Build version 8W120l
UPDATE: this was solved … HUGE thanks to @rapropos — when a component is needed in a page … import components via their modules into the pages modules
I am trying to port my project to Ionic 3 …
Regarding the new .module.ts files are created automatically using the latest version of the CLI …
I have a simple component that uses @Input() to receive and set a property
I have tried importing this component into my project at the app.module level, and at the page level
The build --prod process fails:
First i get the error which suggests that the component is declared twice, so i tried removing the .module.ts file
Then the build complains its not there…
So i keep the .module, remove import from app.module and only import into page where needed.
Now with the component imported at the page level, on build --prod … i get the error:
Error: Template parse errors: Can’t bind to ‘progress’ since it isn’t a known property of ‘progressbar’
i have tried importing progressbar.module.ts instead of the progressbar.ts, this does not seem to make a difference
I have tried importing the CommonModule in the progressbar.module file that belongs to my component …
Both throw this error …
Is there ANY documentation anywhere explaining how these new .module files work?
Heres the component… its pretty basic…
WHAT am i doing wrong?? Anyone??
Apologies if i seem frustrated … and i get that the Ionic team is working hard to get lazy loading implemented … but this is such a SIMPLE component — it is NOT clear what we are doing wrong here…
import { Component, Input } from '@angular/core';
@Component({
selector: 'progressbar',
templateUrl: 'progressbar.html'
})
export class ProgressbarComponent {
@Input('progress') progress:number;
@Input('seconds') seconds:number;
@Input('config') config:any;
constructor() {
// console.log('Hello Progressbar Component');
}
}
And here is the markup for the page:
<progressbar [progress]="currentPercent" [seconds]="currentSecond" [config]="progressBarConfig"></progressbar>