src/app/components/menu-title/menu-title.component.ts
selector | app-menu-title |
styleUrls | ./menu-title.component.scss |
templateUrl | ./menu-title.component.html |
Methods |
Inputs |
constructor()
|
title | |
Type : string
|
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
import { Component, OnInit, Input } from '@angular/core';
@Component({
selector: 'app-menu-title',
templateUrl: './menu-title.component.html',
styleUrls: ['./menu-title.component.scss']
})
export class MenuTitleComponent implements OnInit {
@Input() title: string;
constructor() {}
ngOnInit() {}
}
<ion-header>
<ion-toolbar>
<ion-buttons slot="start">
<ion-menu-button></ion-menu-button>
</ion-buttons>
<ion-title>{{ title }}</ion-title>
</ion-toolbar>
</ion-header>
./menu-title.component.scss
ion-toolbar {
background: -webkit-linear-gradient(to right, #dbd5a4, #649173); /* Chrome 10-25, Safari 5.1-6 */
--background: linear-gradient(
to right,
#056571,
#649173
); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
color: white;
}
ion-menu-button {
--color: white;
}