-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[develop] ng-show within window not working #382
Comments
I created a simplified version of the previous plunker. |
We are having the same problem. Does anybody have a hint on how this could be fixed or where the actual issue is? This is a regression as it works on master... |
I'll add it to 1.1.0 milestone. |
This probably happened due to the efforts of getting clicking to work inside a window. If ng-show is not working though the main controller it might need a sub-controller like infoWindowController (in the examples). |
Areas that changed and compile the template. This is for the actual child (after) it has been interpolated by windows parent. |
Is this on both windows and window directive? |
We are using window |
Window is much easier to debug, however the fix needs to work for both. |
Hmm, I fear my angular skills are not adequate to understand everything you are explaining but thanks for looking into this issue. |
Ok I'll get to it when I can. |
@BenSwennen @francisdb I am pretty sure this is not a bug but a mis-understanding of how things work. I believe this is the same situation on how to get things to work with a button click within a window. Therefore you will need a second controller which is bound to each window and you will use it's scope function and properties. Please see the examples for inforWindowController. I will verify this. |
@nmccready So why this complexity of adding another controller, can't this "just work" as one would expect? |
I am not entirely sure yet but I know that the other way works. @nlaplante might have a better explanation as he originally got the clicking to work. |
I think I can maybe explain it a little better. You need to break the idea that window being created via the directive is alway attached to the main controller. Once it is created by google it is detached from the scope of any controller. Therefore we need to rebind it to another controller which injects itself into the real window. The {{m.whatever}} portion is only being used for compiling of the html which is handed off to the google options to create the html. |
I am editing the plunkr. Maybe a possible improvement of this can come at later time, but the work around should be sufficient for this release. |
Ok, thanks, that should at least get us going 👍 |
Hey all, I have still problem with ng-show.. I have dynamic selected. <ui-gmap-window coords="selected" show="selected.show" closeClick='selected.onMarkerClose()' ng-cloak>
<div style="min-width: 230px;">
<div ng-show="selected.atest">aaa</div>
<div ng-show="selected.btest">bbb</div>
</div>
</ui-gmap-window> |
For people still experiencing this issue: you can use : |
Thanks @abdellah-neo |
When I use ng-show within the window directive, my strong-tag won't show although the expression is true. I put the expression I'm using outside the ng-show and then it says "true", so the expression is indeed true.
This is only an issue on the development version, as it does work on the release version.
I created a plunker to show my problem.
http://plnkr.co/edit/A6eDExMqECldHAOLcVGP
The text was updated successfully, but these errors were encountered: