title: How to get current value of Angular Material slider?
body: <blockquote>
    <p>My question is different to
    <a href="https://stackoverflow.com/questions/46906219/get-mdslider-value-in-angular-2">Get mdslider value in angular 2?</a>
    in that I needed to pass the value of the slider to the component, not
    just use a local variable; but also in respect of Angular Material
    having changed so that the slider now requires an $event object to be
    passed to the component function.</p>
  </blockquote>
  
  <p>I have an Angular Material slider component in Angular 4:</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;mat-slider min="430" max="500" step="10" value="450" (input)="pitch($event)"&gt;&lt;/mat-slider&gt;
  </code></pre>
  
  <p>TS</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { Inject, Injectable } from '@angular/core';
  import { MatSlider } from '@angular/material';
  import { AudioContext } from 'angular-audio-context';
  
  @Component({
    selector: 'pitch-slider',
    templateUrl: './pitch-slider.component.html',
    styleUrls: ['./pitch-slider.component.css']
  })
  
  
  export class PitchSliderComponent implements OnInit {
  
  
  
    constructor(private _audioContext: AudioContext) { }
  
    ngOnInit() {
    }
  
  }
  </code></pre>
  
  <p>I am quite new to Angular and I'm having trouble getting the current value of the slider. It doesn't seem to work with $event object?</p>