0

It's possible that I'm not understanding the scopes correctly, but I'm having problems getting some features of my implementation to work. One of which is explained here: https://github.com/nlaplante/angular-google-maps/issues/473

I basically get the model information in the windows directive without ng-non-bindable, which prevents ng-click from working. But my ng-click method needs the information from the model to work properly.

The other issue, which you can also see in the code example at that link, is that I need to essentially show two markers per marker - what I mean is, I need to show a "frame" and then the image for each marker, which are always going to be two separate images. Is there a way to accomplish this?

Added plunkr which demonstrates both problems: http://plnkr.co/edit/QJmHKBSV2XniqF6HX7FS?p=preview

You can see that the links within the window do not work properly (they won't deliver information from the scope because that scope is isolated ?), and the other problem is going to take a more creative approach, which is that I basically need to include two images with each marker.

jonathonh
  • 153
  • 2
  • 16
  • Plz: prepare a fiddle/plnkr, whatever playable. – artur grzesiak Jun 09 '14 at 15:05
  • I tried going through the coffee script but I can't see where the scope is being isolated and I can't seem to come up with a workaround or solution outside of going back to ng-repeat. But there has got to be a solution for this. – jonathonh Jun 10 '14 at 15:48

1 Answers1

5

Try this for your details button:

<button class="btn btn-etk-green" ng-click="$parent.$parent.$parent.deviceDetails(model.id)">Details</button>

Not sure what angular google maps is doing, but after some inspecting it looks like it's dumping all your data into the model property. So you can access it that way.

Here's the edited plunkr: http://plnkr.co/edit/zkYSqcf1735nOOd4QmBI?p=preview

Mathew Berg
  • 28,625
  • 11
  • 69
  • 90
  • @Mathew Berg Thanks for this. But I also want to show image in windows .. But i cant get success. Plz help me if you know – Nishchit Aug 06 '14 at 13:07