Skip to content

Instantly share code, notes, and snippets.

@oleersoy
Created December 4, 2018 21:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oleersoy/3ea66728f6447d9a52f9656874372876 to your computer and use it in GitHub Desktop.
Save oleersoy/3ea66728f6447d9a52f9656874372876 to your computer and use it in GitHub Desktop.
import { Component, Output, EventEmitter } from '@angular/core';
@Component({
selector: 'my-toolbar',
template: `
<mat-toolbar color="primary">
<button mat-icon-button (click)="menu.emit()">
<mat-icon>menu</mat-icon>
</button>
<ng-content></ng-content>
</mat-toolbar>
`,
})
export class ToolbarComponent {
@Output() menu = new EventEmitter();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment