This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ControlValueAccessor } from '@angular/forms'; | |
export class BaseControlValueAccessor<T> implements ControlValueAccessor { | |
public disabled = false; | |
/** | |
* Call when value has changed programmatically | |
*/ | |
public onChange(newVal: T) { } | |
public onTouched(_?: any) { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<label class="range__label"> | |
<input type="range" | |
[id]="forID" | |
class="range__input" | |
[max]="max" | |
[step]="step" | |
(touch)="onTouched()" | |
[ngModel]="value" | |
(ngModelChange)="onInput($event)" | |
[name]="name" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AfterViewInit, Component, OnDestroy, OnInit } from '@angular/core'; | |
import { Subject } from 'rxjs'; | |
@Component({ | |
selector: 'sys-sound', | |
templateUrl: './sys-sound.component.html', | |
styleUrls: ['./sys-sound.component.scss'] | |
}) | |
export class SysSoundComponent implements OnInit, AfterViewInit, OnDestroy { | |
private _ngUnsubscribe: Subject<void> = new Subject<void>(); |