ipsos-components
Version:
Material Design components for Angular
34 lines (28 loc) • 787 B
text/typescript
/**
* @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.io/license
*/
import {Component} from '@angular/core';
import {MatSnackBar} from '@angular/material';
({
moduleId: module.id,
selector: 'button-a11y',
templateUrl: 'button-a11y.html',
styleUrls: ['button-a11y.css'],
})
export class ButtonAccessibilityDemo {
counter: number = 0;
constructor(public snackBar: MatSnackBar) {}
openSnackBar(message: string) {
this.snackBar.open(message, '', {
duration: 2000,
});
}
increase() {
this.counter++;
this.openSnackBar(`Click counter is set to ${this.counter}`);
}
}