Created
November 18, 2017 09:36
-
-
Save raffaele-abramini/1a71b9a3d99f3ee292fadb5c95781201 to your computer and use it in GitHub Desktop.
Angular 4 - DOM element ref - 2
This file contains hidden or 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 { 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