I would like to know how to get the value from an input on angular 4. I looked over the documentation on angular and the example with the key event doesn\'t work very well for m
HTML Component
TS Component
public txtValue = new FormControl('', { validators:[Validators.required] });
We can use this method to save using API. LearnersModules is the module file on our Angular files SaveSampleExams is the service file is one function method.
> this.service.SaveSampleExams(LearnersModules).subscribe(
> (data) => {
> this.dataSaved = true;
> LearnersModules.txtValue = this.txtValue.value;
> });