Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine "selector" and "element" selectors #8

Open
ottiker opened this issue May 20, 2015 · 6 comments
Open

Combine "selector" and "element" selectors #8

ottiker opened this issue May 20, 2015 · 6 comments

Comments

@ottiker
Copy link
Owner

ottiker commented May 20, 2015

No description provided.

@IonicaBizau
Copy link
Contributor

What is this issue about? @adioo @gabipetrovay @lcristianiim

@lcristianiim
Copy link
Collaborator

I thing it was something about not working the "element" selector.

@IonicaBizau
Copy link
Contributor

Ah, or maybe it's about using the selector and element fields together. 💡

@gabipetrovay
Copy link
Collaborator

Probably because they do a similar thing and having two names for the same thing would be redundant?

@lcristianiim
Copy link
Collaborator

Maybe it can also have positive influence. For example:
We are using classes and id's for UI, but also for logic.
When we modify the UI layout we will reorganize classes, id's and it is easy to mess up the logic that is based upon classes and id's.
Maybe it would be nice to use classes and id's only for UI, and data-element for logic.

@IonicaBizau
Copy link
Contributor

@gabipetrovay No, no. element is now converted internally in selector = "[data-element='<element>']". They are not redundant. I guess @adioo means to use it something like this:

{
   "element": "my-element",
   "selector": ".my-class",
   "on": "click",
   "flow": "event"
}

...which will add c lick listeners to the following DOM elements (according to #7):

<div class="my-class"></div>
<span class="my-class"></span>
<span data-element="my-element"></span>
<button data-element="my-element"></button>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants