Minimal app / "strip" ionic blank starter?

Hi,

just as a test (and to understand a bit better how things are loaded) i tried to remove pages/home/* from the ionic blanc starter. My idea was it I would like to create a minimal app that has just the files under scr/app/*

However, everything I tried to change in app.html and app.component.ts (e.g. setting rootPage, …)
was no success, i can’t get this running.

Can someone give me a hint ?

Grüße aus Heidelberg - Michael

I don’t really understand why you would want to do that…

but wouldn’t emptying app.html an cleaning all mentions of HomePage take care of that?

Hi thanks for the answer,

there is no “reason” doing it. Its just an exercise (for me) to understand ionic a bit better.

empting app.html (or copy the directives from home.html) and remove all Homepage references, was my first try.
It complies but it display nothing. And i like at least a “Hello wold” on the rootPage.

Did you replace the content of app.html with “Hello World”?

Maybe it needs a nav to render anything… might want to read the docs on that.

(Kind of dumb but interesting exercise by the way - in a good way)

Ah ok I have it - It does not work if the nav ist there:

app.componet.ts:

import { Component } from '@angular/core';

@Component({
  // templateUrl: 'app.html'
  template: `<h1>Hello World</h1>`
})
export class MyApp {
  constructor() {}
}

works

my mistake was a template with (that does not work):

<ion-nav>
    Hello World
</ion-nav>
1 Like

Yeah, ion-nav is really to load in stuff: https://ionicframework.com/docs/api/components/nav/Nav/