How do you select an element with in a component template?
You can use @ViewChild
directive to access elements in the view directly. Let's take input element with a reference,
<input #uname />
and define view child directive and access it in ngAfterViewInit lifecycle hook
@ViewChild('uname') input;ngAfterViewInit() {console.log(this.input.nativeElement.value);}
September 22, 2022
241
Read more
What is Angular Framework?
November 04, 2022
AngularWhat is a Angular module?
November 03, 2022
AngularWhat are the steps to use animation module?
October 31, 2022
Angular