Volodya-NRG2017-05-06 02:25:14
Volodya-NRG, 2017-05-06 02:25:14

Angular2, one function per selector wherever it can occur?

There is a radio button / checkbox, it is wrapped in a div, which also has a title. When clicking on the name, I also want to toggle this input.
These elements are found on many components.
Where to create one function that will take on this task?

<div class="block-checkbox-radio">
     <input type="checkbox" name="name" /> text

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Eugene M., 2018-07-02

One of the options:

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/(.*)$ /$1?$2 [L]

Dmitry Luzanov, 2017-05-06

Wrap not in a div but in a label, right?
Leave the logic to Angular. This behavior is implemented natively.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question