reharri7 / cdshort

cdshort-l85d.vercel.app
2 stars 2 forks source link

Hide home page on loading #3

Closed reharri7 closed 1 year ago

Yasir761 commented 2 years ago

Can you please elaborate on this issue, much appreciated, and wanted to work on this issue.

B1910668-TN commented 2 years ago

Hi, you want to have the line "loading" before the homepage appears, right? If that's the case, I've helped you get it done. I will push it to the dev branch, you can check it out. Hope it can help you.

reharri7 commented 2 years ago

This issue will require re-implementing OnInit on the home.page.ts file.

  1. Create a boolean class variable named isLoading and set it to false initially.
  2. In the ngOnInit method (a lifecycle hook provided by Angular) set isLoading to true.
  3. Implement all the redirect functionality that is provided in the constructor.
  4. At then end of the ngOnInit method, set isLoading to false. In the home.page.html file, use the ngIf directive to conditionally show the content of that page whether the page is loading or not.
  5. If it is loading, show an <ion-spinner />

Please create a feature branch for this and make a pull request to dev