-
Notifications
You must be signed in to change notification settings - Fork 43
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
Wrong API id if id contains an angular expression #25
Comments
I answer my own question: replacing this:
with
fixes the problem since attrs will contain the interpolated attribute. |
Hi warpdesign, Having both the problem and a one-line solution served on a silver platter makes for an excellent day in Developerville :-) Thanks for pointing out the issue. I'll integrate the fix ASAP. Cheers, |
Great! :) Unfortunately I found other problems. Similar fix is needed in panzoomwidget directive, compile function:
Again, this uses the non interpolated id. Problem is we do not have access to the interpolated value into the compile function. I ended up using the pre/post functions to get the panzoomId. And I had to move the code from the controller into this function since controller method would be called before the pre/post functions, so before the pannzoomId is set. In the end this is quite a lot of changes. If you want I could make a pull request with the changes. |
Hi, Thanks for your offer. A pull request would be much appreciated :) Just out of curiousity .. do you use a large number of simultaneous panzoom directives on your page? Cheers, |
Not a large number. I'd say we use 1-5 max panzoom directives. I'll make a pull request later this week then :) |
When using an Angular expression into the panzoom element's id, the raw (not parsed) expression will be used as elementId:
Ending up with a wrong index in API when calling PanZoomService.registerAPI:
So if you have something like
I think parsing the angular expression would fix the problem.
The text was updated successfully, but these errors were encountered: