Hi, is it possible to make the text and button in
in home page disappear after i’m adding a new item in new-item page in ionic 4?
I want the text welcome, let’s get started and the button below disappear after user click the create button in the newchild page. Can someone help me with this? Here is the code :
home.html
<ion-header>
<ion-toolbar>
<ion-title>Dashboard</ion-title>
<ion-buttons slot="end">
<ion-button [routerLink]="['/addchild']">
<ion-icon slot="icon-only" name="add"></ion-icon>
</ion-button>
</ion-buttons>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-item>
<ion-label>Search</ion-label>
<ionic-selectable item-content [(ngModel)]="port" itemValueField="id" itemTextField="name" [items]="ports" [canSearch]="true"
(onChange)="portChange($event)">
</ionic-selectable>
</ion-item>
<section class="ion-padding-top" text-center>
<div><br><br><br><br><br><br><br><br><br>
<h1 style="font-size:1.4em" ion-margin>Welcome, let's get started !</h1><br>
<ion-button (click)="myAction()" fill="outline" color="secondary-shade" shape="round" class="my-action-button" routerLink="/addchild">Add your first child's profile</ion-button>
</div>
</section>
</ion-content>
newchild.html
<ion-header>
<ion-toolbar>
<ion-buttons slot="start" defaultHref="/tabs/childdetails">
<ion-back-button></ion-back-button>
</ion-buttons>
<ion-title>New Child</ion-title>
</ion-toolbar>
</ion-header>
<ion-content padding>
<ion-list>
<form [formGroup]="new_child_form" (submit)="createChild(new_child_form.value)">
<ion-item>
<ion-label position="floating">Child Name</ion-label>
<ion-input type="text" formControlName="childname" required></ion-input>
</ion-item>
<ion-item>
<ion-label position="floating">Display Name</ion-label>
<ion-input type="text" formControlName="childnickname" required></ion-input>
</ion-item>
<ion-item>
<ion-label>Gender</ion-label>
<ion-select id="gender">
<ion-select-option value="g">Girl</ion-select-option>
<ion-select-option value="b">Boy</ion-select-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label>Date</ion-label>
<ion-datetime display-format="DD MMM YYYY"></ion-datetime>
</ion-item>
<ion-button class="submit-btn" expand="block" type="submit" [disabled]="!new_item_form.valid">Create</ion-button>
</form>
</ion-list>
</ion-content>