0

GitHub: https://github.com/eshk12/Parabi/

I'm trying to add A new component call Medicine (located in Pages dir). I have imported it to app.modules.ts and to app.component.ts, after I imported it. I get a Blank Screen with this error:

Unhandled Promise rejection: Failed to load HomePage.html ; Zone: <root> ; Task: Promise.then ; Value: Failed to load HomePage.html undefined

I hope you guys help me, THX!

2 Answers 2

1

In your app.component.ts, you need to add that page to array component.

this.pages = [
  { title: 'עמוד הבית', component: HomePage },
  { title: 'WhatEverTitle', component: Medicine },
 ];

Also import that page. Looks like your Medicine.html also need some refactoring.

I would suggest you to generate page using following command

 ionic g page Medicine
0
0

You dont have to fix your app.component, but like Savan said, you need to look at Medicine.html. It should not have all of the usual doctype, heading, body, (etc..) tags. For testing purposes I deleted the content from Medicine.html, and added this

<ion-content>       
    <p color="dark">Title</p>
</ion-content>

Use the ionic cli to generate pages, components, and directives.

https://ionicframework.com/docs/v2/cli/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.