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

in-view-container doesn't work with example #9

Closed
bettysteger opened this issue Feb 26, 2014 · 5 comments
Closed

in-view-container doesn't work with example #9

bettysteger opened this issue Feb 26, 2014 · 5 comments

Comments

@bettysteger
Copy link

I'm using in-view-container for a scrollable div and I'm trying this like the example:

in-view="lineInView($index, $inview, $inviewpart)"

but $index is always undefined! can this be fixed easily so that it will work like in the example?

@scaleupcto
Copy link

Related to #5?

@bettysteger
Copy link
Author

hmm could be, but it triggers the function!

@pierrejdlf
Copy link

hello
i may have a similar issue (also using the in-view-container)
i'm trying to access the DOM $element from within the "lineInView" function

a possible fix (for me) is to add a line (line 69) like:

              return this.scope.$apply(function() {
              return inViewFunc(_this.scope, {
                '$inview': $inview,
                '$inviewpart': $inviewpart,
                '$element':_this.element
              });
            });

is this the best way to do that ?

@thenikso
Copy link
Owner

thenikso commented Mar 4, 2014

I've added an example and fixed the problem that @lpsBetty noted.
@pierrejdlf your request to have the in-view element passed as a local variable is legit. Can you open a related issue?

thank you all 😄

@pierrejdlf
Copy link

thanks !

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

4 participants