/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/dev-app/menu/menu-demo.ts
40 строк
1 KB
Kristiyan Kostadinov
build: remove explicit OnPush from dev app
18 май 2026, 10:44
18 май 2026, 10:44
40d7c5a
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Component} from '@angular/core'; import {MatButtonModule} from '@angular/material/button'; import {MatDividerModule} from '@angular/material/divider'; import {MatIconModule} from '@angular/material/icon'; import {MatMenuModule} from '@angular/material/menu'; import {MatToolbarModule} from '@angular/material/toolbar'; @Component({ selector: 'menu-demo', templateUrl: 'menu-demo.html', styleUrl: 'menu-demo.css', imports: [MatMenuModule, MatButtonModule, MatToolbarModule, MatIconModule, MatDividerModule], }) export class MenuDemo { selected = ''; items = [ {text: 'Refresh'}, {text: 'Settings'}, {text: 'Help', disabled: true}, {text: 'Sign Out'}, ]; iconItems = [ {text: 'Redial', icon: 'dialpad'}, {text: 'Check voicemail', icon: 'voicemail', disabled: true}, {text: 'Disable alerts', icon: 'notifications_off'}, ]; select(text: string) { this.selected = text; } }