I try to get all elements by class name from HTML template,in the TS File. This is what i tried so far. <div class="form-group" > <label class="name" class="col-sm-2 control-label" [attr.for]="'skillName' + i"> {{ arr}} {{ i }} </label> </div> ngAfterViewInit() { let el = this.document.getElementsByClassName('name'); console.log(el) console.log("*") } Continue reading...