Guest User

Untitled

a guest
Dec 12th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. <ion-item>
  2. <ion-label stacked>Test</ion-label>
  3. <ion-input formControlName="teste" [ngModel]="teste" type="text"></ion-input>
  4. <button large type="button" (click)="input_to_voice($event)" clear ion-button icon-only item-end>
  5. <ion-icon name="mic"></ion-icon>
  6. </button>
  7. </ion-item>
  8.  
  9. input_to_voice(event, value) {
  10.  
  11. //here I wanted to get a reference to the input value, but I'm stuck
  12. console.log(event.target.parentElement.parentElement);
  13.  
  14. let options = {
  15. language: "en-GB"
  16. };
  17.  
  18. // Start the recognition process
  19. this.speechRecognition.startListening(options)
  20. .subscribe(
  21. (matches: Array<string>) => console.log(matches),
  22. (onerror) => console.log('error:', onerror)
  23. )
  24. }
Add Comment
Please, Sign In to add comment