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.

4

1 回答 1

5

试试这个为您的详细信息按钮:

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

不知道角度谷歌地图在做什么,但经过一番检查后,它看起来像是将所有数据转储到模型属性中。所以你可以通过这种方式访问​​它。

这是编辑后的 ​​plunkr:http ://plnkr.co/edit/zkYSqcf1735nOOd4QmBI?p=preview

于 2014-06-10T16:49:33.587 回答