-
Notifications
You must be signed in to change notification settings - Fork 237
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
ng-click is disabled #53
Comments
After testing some more I found out the ng-click is in fact NOT disabled. The issue is accessing the outer scope which has the definition of the click function. Since the SLICK directive creates its own scope the outer scope is never reached. So the question is how to access to outer (parent) scope, similar to defining the 'data' attribute. Any help would be appreciated. |
Not sure if it will work, but you could try placing the function inside a model on the scope instead of on the scope directly. So instead of: Again, I haven't exactly tried this, it's just a suggestion |
I was able to resolve this by passing the scope to slick as the data attribute. This allowed me to access multiple properties of the scope, including functions and model objects. // 'this' is a reference to $scope
<slick data=this>
<div ng-click="data.clickHandler()">{{data.model}}</div>
<slick> |
A good thing you are not working with dynamic data then xD |
This hack doesn't work with dynamic data. Neither does adding function to the object. |
@jhjwind I think I worked with something similar. I'll see if I can find a working bit of code later on and post it some time today |
Check my answer for Angular use-case: |
I have multiple elements inside each slide with ng-click's attached to them. They all seem to be disabled. Anyone know how I can enable them or possible workarounds?
The text was updated successfully, but these errors were encountered: