I have a component called footer, it contains the following code:
footer.html
<ion-footer>
<ion-toolbar color="black-light">
<button ion-button color="light" full clear>{{btnFooter}}</button>
</ion-toolbar>
</ion-footer>
footer.ts
import { Component, Input } from '@angular/core';
import { CadastroContaPage } from '../pages/cadastro-conta/cadastro-conta';
@Component({
selector: 'footer',
templateUrl: 'footer.html'
})
export class FooterComponent {
//INSERIR OS ELEMENTOS NOS BOTÕES
@Input() btnFooter: string;
constructor() {}
}
This component will be on several pages, so I can not put a fixed link to it, because on each page there will be a different link. I have a page called register-account that is CadastroContaPage, I would like the footer component in the login-account page to change to the account-register page as soon as it clicks on the component.