Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OnChange callback for md-slider in Angular Material Design

How can I know in controller that the value of < md-slider > from Angular Material Design has changed?

like image 439
user4401 Avatar asked Feb 14 '15 17:02

user4401


People also ask

How to add a mat slider in Angular Material?

First, install the angular material using the above-mentioned command. After completing the installation, Import ‘MatSliderModule’ from ‘@angular/material/slider’ in the app.module.ts file. Then use the mat-slider tag to display the slider.

What is slider in Angular 7?

Angular Material 7 - Slider. The <mat-slider>, an Angular Directive, is used as a enhanced range selector with material design styling and animation capabilities. In this chapter, we will showcase the configuration required to draw a slider control using Angular Material.

What is selectionchange event in Angular Material select?

Angular Material Select Change Event By Arvind Rai, October 12, 2019 Angular Material Select provides selectionChange event that emits when the selected value has been changed by the user. The event selectionChange is used with <mat-select> element as following.

What is onchanges in Angular 2?

Angular provides lifecycle hooks for change detection. OnChanges is an interface and has a method declaration i.e ngOnChanges () . In parent-child component, the child component declares @Input () property to get values from parent component.


1 Answers

you can add ng-change on the directive

<md-slider min="0" max="50" ng-model="text" ng-change="myMethod()" md-discrete></md-slider>
like image 199
D-Go Avatar answered Sep 28 '22 07:09

D-Go