Questions tagged [elementref]
78 questions
0
votes
2 answers
Implementing your own *ngIf
I want to create my own *ngIf Directive. The directive will get a number and it wont render the template if the screen inner-Width pixels is less then the number it got.
How can I implement my own *ngIf?

Udi Mazor
- 1,646
- 2
- 15
- 30
-1
votes
1 answer
Replacing document.getElementById('checkBox') in Angular
I am trying to replace the document.getElementById from:
target = document.getElementById('checkBox') as HTMLInputElement;
I have tried:
adding #target in html
import ElementRef and ViewChild
add @ViewChild('target') public target:…

Cho
- 11
- 5