Skip to content

Instantly share code, notes, and snippets.

@raffaele-abramini
Created November 18, 2017 09:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raffaele-abramini/1a71b9a3d99f3ee292fadb5c95781201 to your computer and use it in GitHub Desktop.
Save raffaele-abramini/1a71b9a3d99f3ee292fadb5c95781201 to your computer and use it in GitHub Desktop.
Angular 4 - DOM element ref - 2
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-my-component',
templateUrl: './my-component.component.html',
styleUrls: ['./my-component.component.css']
})
export class MyComponentComponent implements OnInit {
constructor() { }
ngOnInit() {}
doSomething(myInput: HTMLInputElement) {
const value = myInput.value;
console.log(value);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment