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

Binding to child elements of the component #7

Open
acidjazz opened this issue Jul 1, 2017 · 2 comments
Open

Binding to child elements of the component #7

acidjazz opened this issue Jul 1, 2017 · 2 comments

Comments

@acidjazz
Copy link

acidjazz commented Jul 1, 2017

I wonder if it would be possible to use this on elements w/in the component, similar to the viewport directive you've made where I can just add the directive anywhere.

Maybe for example w/in my component I add a :in-viewport-child='identifier' and then my watch of inViewport.now is passed that value as a second argument along with visible.

watch: {
  'inViewport.now' (visible, child) {
  }

Or maybe a second type to watch, inViewport.child, this way the feature is a bit more backwards compatible.

I'd definitely find this pretty helpful.

@weotch
Copy link
Member

weotch commented Jul 2, 2017

Yeah, I like that. It's like are changing the target that is watched.

I don't see me starting this any time soon, but I'll keep it in mind.

@acidjazz
Copy link
Author

acidjazz commented Jul 6, 2017

@weotch Thanks, glad you like the idea. I'll fork this and give it a whirl myself when I get some free time

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

No branches or pull requests

2 participants