Ich habe wenige Seiten in einer ionischen App erstellt, aber beim Aufruf der Seite bekomme ich den folgenden Fehler Uncaught (in promise): Error: No component factory found for BoxPage. Did you add it to @NgModule.entryComponents?
Allerdings habe ich die Seite Details der app.component.ts
als import { BoxPage } from '../pages/box/box';
hinzugefügt, aber das Problem bleibt bestehen. Ich habe einige Seiten wie Home, Produktdetails und Warenkorb usw. implementiert, aber alle neu erstellten Seiten zeigen den Fehler an, dass das Problem auch für einige andere neu erstellte Seiten bestehen bleibt.Komponentenproblem in ionic 3
Antwort
Genau wie der Fehler sagt:
Error: No component factory found for BoxPage. Did you add it to @NgModule.entryComponents?
Sie müssen die Seite (Komponente) mit dem @NgModule
Ihrer app.module.ts
Datei hinzuzufügen. Sie können weitere Informationen in Ionic docs finden:
No component factory found for...
This error happens when you are trying to use a component, provider pipe or directive that has not been imported and added to your
ngModule
. Whenever you add a new component, provider, pipe or directive to your app, you must add it to thengModule
in thesrc/app/app.module.ts
file for Angular to be able to use it. To fix this error you can import the offending component, provider, pipe or directive into theapp.module
file and then if it is a provider add it to the providers array and for a component, pipe or directive add it to both the declarations array and entryComponents array.
So in diesem Fall müssen Sie es sowohl hinzuzufügen, die entryComponents
und declarations
Arrays:
import { BoxPage } from 'the/path/to/the/file';
// ...
@NgModule({
declarations: [
// ...
BoxPage // <- Here!
],
imports: [
// ...
],
bootstrap: [IonicApp],
entryComponents: [
// ...
BoxPage // <- and also here!
],
providers: [
// ...
]
})
export class AppModule { }
- 1. flash cs3 komponentenproblem
- 2. styling popup in ionic 3
- 3. 3D-Zahlungsabwicklung in Ionic 3
- 4. Ionic 3 coverflow implementation
- 5. epubJS Ionic 3 Integration
- 6. ionic 3 directional styling
- 7. Ionic 3-Eingabemaske
- 8. ionic 3 - zeige gerundetes Bild
- 9. Natives Spinner-Dialogfeld (IONIC 3)
- 10. Ionic 3 Block Rücktaste Ereignis
- 11. Ionic 3 Directive funktioniert nicht
- 12. Http Provider Fehler Ionic 3
- 13. Ionic 3 - approxItemHeight nicht in virtualScroll Arbeits
- 14. Arrays in Ionic 3 lokalen Speicher
- 15. CloudModule funktioniert nicht in ionic 3
- 16. Ionic 3 Fehler in JSON Parsing
- 17. Ionic 2/3 Mocking Toasts
- 18. Ionic 3 - Asynchrone Http-Aufrufe und Ionic Loading Problem
- 19. Ionic TabBar auf bestimmten Unterseiten ausblenden (IONIC 3)
- 20. ionic 3, Lazy-Loading Tabs Komponenten
- 21. Debug Ionic 3 Code auf dem Gerät
- 22. Einfügen Anbieter für SQLiteObject ionic 3
- 23. Ionic-3 kann nicht Rohr finden
- 24. Ionic 3 Inhalt einer Asset-Datei abrufen
- 25. Upgrade oder nicht auf Ionic 3 upgraden?
- 26. Ionic 2/3: Laufzeitfehler: Eigenschaft undefined
- 27. JWT + IONIC 3 und Laravel 5.4 Ausgabe
- 28. Ionic 3 - POST Daten zu Heroku Endpoint
- 29. Sass ändern Symbol der Suchleiste ionic 3
- 30. Ionic 3 Tastatur Ausgabe auf Ionen Eingang
Das funktionierte gut, aber ein Problem weiterhin besteht nach wie vor dass die rückseite bei allen neu gestalteten seiten fehlt fehlt mir noch etwas? – OshoParth
Hmm, das hängt damit überhaupt nicht zusammen ... Könntest du bitte eine weitere Frage zu SO mit dem Code dieser Seite hinzufügen, damit ich einen Blick darauf werfen kann? – sebaferreras