Toolbar

API for toolbar

API reference for Angular Material toolbar

import {MatToolbarModule} from '@angular/material/toolbar';

Selector: mat-toolbar-row

Exported as: matToolbarRow

Selector: mat-toolbar

Exported as: matToolbar
Properties
Name Description
@Input()

color: ThemePalette

Theme color palette for the component.

defaultColor: ThemePalette | undefined

Default color to fall back to if no value is set.

API reference for Angular Material toolbar-testing

import {MatToolbarHarness} from '@angular/material/toolbar/testing';

Harness for interacting with a standard mat-toolbar in tests.

Methods
async
getAllChildLoaders
Parameters

selector

S

Returns
Promise<HarnessLoader[]>

async
getAllHarnesses
Parameters

query

HarnessQuery<T>

Returns
Promise<T[]>

async
getChildLoader
Parameters

selector

S

Returns
Promise<HarnessLoader>

async
getHarness
Parameters

query

HarnessQuery<T>

Returns
Promise<T>

async
getRowsAsText

Gets the text of each row in the toolbar.

Returns
Promise<string[]>

async
hasMultipleRows

Whether the toolbar has multiple rows.

Returns
Promise<boolean>

async
host

Gets a Promise for the TestElement representing the host element of the component.

Returns
Promise<TestElement>

A set of criteria that can be used to filter a list of MatToolbarHarness instances.

Properties
Name Description

text: string | RegExp

Only find instances whose text matches the given value.