I have a window that I'd like to toggle open and closed from a controller but since kendo creates it's windows outside of the body tag I cannot reference it using $scope.myWindow. What is the best way to access this window from a controller?
5 Answers, 1 is accepted
0
Hello Kelly,
See this Dojo snippet for a demo of referencing the window from a scope method.
Regards,
Alex Gyoshev
Telerik
See this Dojo snippet for a demo of referencing the window from a scope method.
Regards,
Alex Gyoshev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Kelly
Top achievements
Rank 1
answered on 16 Oct 2014, 12:27 PM
Does this work when you include a window with ng-include or if you are trying to call a window from an included html snippet?
Examples:
1.
<ng-controller>
<open window command />
<ng-include "window" />
</ng-controller>
2.
<ng-controller>
<ng-include "window open inside this code" />
<window />
</ng-controller>
Examples:
1.
<ng-controller>
<open window command />
<ng-include "window" />
</ng-controller>
2.
<ng-controller>
<ng-include "window open inside this code" />
<window />
</ng-controller>
0
Hello Kelly,
A more appropriate way to achieve this would be to have a hollow window around the ng-include. This way the open button will not trust blindly that the include includes the window, and the include will contain only the inner logic. Placing the window in an ng-include might register it in a child scope, thus it will be unavailable to outside widgets.
Regards,
Alex Gyoshev
Telerik
A more appropriate way to achieve this would be to have a hollow window around the ng-include. This way the open button will not trust blindly that the include includes the window, and the include will contain only the inner logic. Placing the window in an ng-include might register it in a child scope, thus it will be unavailable to outside widgets.
Regards,
Alex Gyoshev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

asd
Top achievements
Rank 1
answered on 11 Nov 2014, 10:46 AM
Is there a possibility to make it work using ng-include? Iam asking because I would like to have 2 views:
First with grid and data
Second with kendo window that opens whenever I add/edit grid row.
In second view I want to define what fields are present in window and whats the width and heght of that window. ( using k-content: {url: ...} is not a option for my case )
First with grid and data
Second with kendo window that opens whenever I add/edit grid row.
In second view I want to define what fields are present in window and whats the width and heght of that window. ( using k-content: {url: ...} is not a option for my case )
0
No, using a ng-include creates another scope, so the window is not usable in the controller. Use one of the solutions outlined in the thread.
Regards,
Alex Gyoshev
Telerik
Regards,
Alex Gyoshev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!