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

Dynamic hm-recognizer-options #61

Open
davizuku opened this issue Oct 23, 2015 · 0 comments
Open

Dynamic hm-recognizer-options #61

davizuku opened this issue Oct 23, 2015 · 0 comments

Comments

@davizuku
Copy link

Hello,

I have managed to insert variables from my $scope into the attributes of the hm-recognizer-options directive.

hm-recognizer-options='[
    {"type":"tap","enable":{{!cac.isReduced}}},
    {"type":"press","time":2000,"enable":{{!cac.isReduced}}},
    {"type":"pan","enable":{{!cac.isReduced}}},
    {"type":"pinch","enable":{{!cac.isReduced}}}
]'

However, the options seem to be compiled with the initial value of the variables, and then not updated when the variable cac.isReduced changes its value. I have tried to initialize the app with the variable assigned to true and assigned to false and then change it through the corresponding interaction in the app, resulting in the same events being recognized.

I would say there are some $watch(...) functions missing, but I do not have time to check it.

Can you have a look at this problem?, I think it would improve a lot the library :).

Thank you in advance!

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

1 participant