File

src/app/components/menu-title/menu-title.component.ts

Implements

OnInit

Metadata

selector app-menu-title
styleUrls ./menu-title.component.scss
templateUrl ./menu-title.component.html

Index

Methods
Inputs

Constructor

constructor()

Inputs

title
Type : string

Methods

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;
}
Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""