I am wondering what are the possibilities with a local variable. I know the following:
You can get the value
<select #selectField (change)="funtionBla(selectField.value)" <option value="1">1</option> <option value="2">2</option> </select>
You can call directive methods
<button type="button" (click)="directiveBla.myFunction()"> test </button>
or HTML based
<video #movieplayer ...> <button (click)="movieplayer.play()"> </video>
But is there a way to change the style of the VIA Local Variable element, or can I add the element to the reference?
You can get a link to elements with a local variable of type
@ViewChild('selectField') someField;
It is also used for DynamicComponentLoader.loadIntoLocation
DynamicComponentLoader.loadIntoLocation
dcl.loadIntoLocation(DynamicElement, _elementRef, 'selectedField')
Source: https://habr.com/ru/post/1624972/More articles:React element not displaying - javascriptВ чем преимущество использования композиции? - javascriptadapter.getBluetoothLeScanner () returns null on some Android 6.0 devices - androidWhy does WeakHashMap have a strong value reference after the GC? - javaКак сортировать два вектора одновременно в С++ без использования boost или создания шаблонов? - c++Implement Jumblr - androidkubernetes mysql chown not allowed - dockerHow to create a histogram from grouped data - pythonHow to determine hijri dates? - javaaccess to a fixed element when using $ (fixedElem) .on (event, dynamicElem, func) - javascriptAll Articles