Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. @Component({
  2. selector: 'accessing-template-reference',
  3. template: `
  4. <div>
  5. <input type="text" #applicationInfo />
  6. <input type="text" #applicationInfo />
  7. <input type="text" #applicationInfo />
  8. </div>
  9. `
  10. })
  11. export class HeroListComponent implements OnInit {
  12. @ViewChildren("applicationInfo") applicationInfo: QueryList<NgModel>;
  13.  
  14. ngAfterViewInit(): void {
  15. console.log("Element List: " + this.applicationInfo.length);
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement